зеркало из https://github.com/mozilla/gecko-dev.git
fix 286446 problems stripping attachments from complext messages, sr=mscott a=asa
This commit is contained in:
Родитель
f819054366
Коммит
f593d8de64
|
@ -1835,7 +1835,7 @@ MimeObject_write(MimeObject *obj, const char *output, PRInt32 length,
|
|||
// if we're stripping attachments, check if any parent is not being ouput
|
||||
if (obj->options->format_out == nsMimeOutput::nsMimeMessageAttach)
|
||||
{
|
||||
// if true, mime genrates a separator in html - we don't want that.
|
||||
// if true, mime generates a separator in html - we don't want that.
|
||||
user_visible_p = PR_FALSE;
|
||||
|
||||
for (MimeObject *parent = obj->parent; parent; parent = parent->parent)
|
||||
|
|
|
@ -189,6 +189,9 @@ MimeMultipartAlternative_parse_child_line (MimeObject *obj,
|
|||
PR_ASSERT(malt->part_buffer);
|
||||
if (!malt->part_buffer) return -1;
|
||||
|
||||
if (!obj->options->state->strippingPart && obj->options->format_out == nsMimeOutput::nsMimeMessageAttach)
|
||||
MimeObject_write(obj, line, length, PR_FALSE);
|
||||
|
||||
/* Push this line into the buffer for later retrieval. */
|
||||
return MimePartBufferWrite (malt->part_buffer, line, length);
|
||||
}
|
||||
|
|
|
@ -413,11 +413,9 @@ MimeMultipart_parse_line (char *line, PRInt32 length, MimeObject *obj)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (obj->options->format_out == nsMimeOutput::nsMimeMessageAttach && mult->state != MimeMultipartPartLine)
|
||||
{
|
||||
if (!obj->options->state->strippingPart /* || mult->state != MimeMultipartHeaders */)
|
||||
if (obj->options->format_out == nsMimeOutput::nsMimeMessageAttach &&
|
||||
(!obj->options->state->strippingPart && mult->state != MimeMultipartPartLine))
|
||||
return MimeObject_write(obj, line, length, PR_FALSE);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -332,7 +332,7 @@ MimeInlineText_parse_decoded_buffer (const char *buf, PRInt32 size, MimeObject *
|
|||
|
||||
/* If we're supposed to write this object, but aren't supposed to convert
|
||||
it to HTML, simply pass it through unaltered. */
|
||||
if (!obj->options->write_html_p)
|
||||
if (!obj->options->write_html_p && obj->options->format_out != nsMimeOutput::nsMimeMessageAttach)
|
||||
return MimeObject_write(obj, buf, size, PR_TRUE);
|
||||
|
||||
/* This is just like the parse_decoded_buffer method we inherit from the
|
||||
|
|
Загрузка…
Ссылка в новой задаче