Change for multipart/mixed, use only a charset of the first attachment, r=sr=mscott, bug 54051.

This commit is contained in:
nhotta%netscape.com 2000-10-06 03:29:34 +00:00
parent f25ab4de98
commit 41671c447e

View File

@ -210,6 +210,12 @@ MimeMultipart_parse_line (char *line, PRInt32 length, MimeObject *obj)
PRBool isBody = MimeObjectChildIsMessageBody(obj, &isAlternativeOrRelated);
if ( (isAlternativeOrRelated || isBody) && obj->options)
{
MimeContainer *container = (MimeContainer*) obj;
// If we have only one child and this is the message body object,
// this we should check for a special charset and notify the emitter
// if one exists!
if ( (isAlternativeOrRelated) || ((container->children) && (container->nchildren == 1)) )
{
char *ct = MimeHeaders_get(mult->hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
if (ct)
{
@ -231,6 +237,7 @@ MimeMultipart_parse_line (char *line, PRInt32 length, MimeObject *obj)
PR_FREEIF(cset);
}
}
}
}
break;
}