зеркало из https://github.com/mozilla/pjs.git
Fix for sending mails with empty bodies - Bug #: 27891 - r: ducarroz - a: phil
This commit is contained in:
Родитель
6543b52771
Коммит
dbc92eaf9e
|
@ -1246,11 +1246,13 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIChannel *aChannel, n
|
|||
if (ptr)
|
||||
{
|
||||
ptr += nsCRT::strlen("charset=");
|
||||
if (*ptr == '"')
|
||||
ptr++;
|
||||
|
||||
char *ptr2 = ptr;
|
||||
while (*ptr2)
|
||||
{
|
||||
if ( (*ptr2 == ' ') || (*ptr2 == ';') )
|
||||
if ( (*ptr2 == ' ') || (*ptr2 == ';') || (*ptr2 == '"'))
|
||||
{
|
||||
*ptr2 = '\0';
|
||||
break;
|
||||
|
|
|
@ -1275,8 +1275,8 @@ nsMsgComposeAndSend::GetBodyFromEditor()
|
|||
if (NS_SUCCEEDED(rv)) {
|
||||
PR_FREEIF(attachment1_body);
|
||||
attachment1_body = outCString;
|
||||
Recycle(bodyText);
|
||||
}
|
||||
Recycle(bodyText);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1662,11 +1662,16 @@ ResetChannelCharset(MimeObject *obj)
|
|||
if ( (msd) && (msd->format_out == nsMimeOutput::nsMimeMessageSaveAs) )
|
||||
{
|
||||
// Extract the charset alone
|
||||
char *cSet = nsCRT::strdup(ptr+8);
|
||||
char *cSet = nsnull;
|
||||
if (*(ptr+8) == '"')
|
||||
cSet = nsCRT::strdup(ptr+9);
|
||||
else
|
||||
cSet = nsCRT::strdup(ptr+8);
|
||||
if (cSet)
|
||||
{
|
||||
char *ptr2 = cSet;
|
||||
while ( (*cSet) && (*cSet != ' ') && (*cSet != ';') && (*cSet != CR) && (*cSet != LF) )
|
||||
while ( (*cSet) && (*cSet != ' ') && (*cSet != ';') &&
|
||||
(*cSet != CR) && (*cSet != LF) && (*cSet != '"') )
|
||||
ptr2++;
|
||||
|
||||
if (*cSet)
|
||||
|
|
Загрузка…
Ссылка в новой задаче