MIME parser for multipart/related should be more tolerant for attachments

RESOLVED DUPLICATE of bug 674473

Status

MailNews Core
MIME
RESOLVED DUPLICATE of bug 674473
6 years ago
6 years ago

People

(Reporter: rocketraman, Unassigned)

Tracking

({testcase})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Created attachment 566852 [details]
A test e-mail demonstrating the issue

The attached test email has an incorrect MIME structure i.e. the e-mail is defined as multipart/related, but contains an unrelated attachment.

However, this e-mail displays perfectly in Outlook -- both the related inline images are shown in the HTML, and the attachment is present. It also displays perfectly via the web interface of Gmail.

Thunderbird, however, does not show the related inline images (it shows them as "broken") and it also does not display the attachment.

Thunderbird should be more lenient in its parsing, like Outlook and Gmail. According to https://bugzilla.mozilla.org/show_bug.cgi?id=76323#c28, this should already be the behavior for the attachment.
(Reporter)

Updated

6 years ago
Keywords: testcase
Same request as bug 674473?
(Reporter)

Comment 2

6 years ago
Yes, I believe it may be a partial duplicate. Bug 674473 does not talk about the inline cid images not showing correctly, so maybe that part of this report is not a duplicate. Of course, the two issues may be related -- I'm not sure.
(Reporter)

Comment 3

6 years ago
In any case, the testcase I attached is useful for verifying a fix. I will upload the same testcase to Bug 674473.
(In reply to rocketraman from comment #2)
> Bug 674473 does not talk about the inline cid images not showing correctly, (snip)

Bug 602718 is for *correct* embed cid image parts in multipart/related.
(Reporter)

Comment 5

6 years ago
(In reply to WADA from comment #4)
> Bug 602718 is for *correct* embed cid image parts in multipart/related.

I haven't read through the whole thing, but according to the description of Bug 602718 it was for displaying cid image parts as attachments when doing "View Message as Plaintext".

In the testcase I attached, the cid image parts are not displaying inline with the normal HTML display.
Attachment #566852 - Attachment mime type: application/octet-stream → text/plain
(In reply to rocketraman from comment #5)
> In the testcase I attached, the cid image parts are not displaying inline
> with the normal HTML display.

Sorry but Tb doesn't accept MIME-type of images/gif as one for image type content with subtype=gif. Tb accepts only "image" as MIME-type for image file.

By the way, if you are interested in malformed multipart/alternative case too, see bug 574989, please.
Blocks: 505172
Depends on: 674473, 602718

Comment 7

6 years ago
> ------=_Part_64277_2001762128.1318488900563
> Content-Type: images/gif

This shouldn't even display correctly with the wrong attachment removed.
If you change it to image/gif and it works, then this is bug 674473 only.

http://tools.ietf.org/html/rfc2045#section-5.1
(Reporter)

Comment 8

6 years ago
I confirm that image/gif for the test case does indeed work correctly.

It is interesting that both Gmail and Outlook accept images/gif as a MIME type -- I guess they explicitly treat "images/*" as equivalent to "image/*", or they have extra code to identify the attachment when they don't understand the MIME type. IMO, Thunderbird should have this too since there are certainly many programmers who mistakenly write "images/" instead of "image/", but that would be a separate (and minor) deficiency. Marking this bug as a duplicate of 674473.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 674473

Updated

6 years ago
No longer blocks: 505172
No longer depends on: 674473, 602718
You need to log in before you can comment on or make changes to this bug.