extension is given a higher precedence over MIME type in Content-Type header when opening an attachment

VERIFIED DUPLICATE of bug 185618

Status

MailNews Core
Attachments
VERIFIED DUPLICATE of bug 185618
15 years ago
10 years ago

People

(Reporter: Jungshik Shin, Assigned: (not reading, please use seth@sspitzer.org instead))

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
The MIME type specified in Content-Type header is ignored and the extension is
used to determine the MIME type. For instance, an attachment of text/plain type
with the extension '.diff' or '.patch' is not recognized as a plain text
document. When I open it, Mozilla prompts me to select a program to open it with
or to save to a file. 

Content-Type: TEXT/PLAIN; charset=US-ASCII; name="test.patch"
Content-Transfer-Encoding: BASE64
Content-Description: test
Content-Disposition: attachment; filename="txt.patch"
(Reporter)

Comment 1

15 years ago
I may have to change the summary line. When I try to open a 'text/plain' type
file with an unusual extension (.e.g. patch, or diff), Mozilla does recognize
the file type correctly as 'text/plain'. What's very odd is that the dialog box
pops up,
in which Mozilla says that 

  The file "txt.diff.txt" (the original name is txt.diff) is of type text/plain
(Text File), and Mozilla does not know how to handle this file type. This file
is located at: 
   imap://...........

What should Mozilla do ....

I'm not sure I've seen this behavior on Linux. I'll change platform to all if I
have a similar problem on Linux.
I think that this is the correct (and this bug invalid) because of this :
Content-Disposition: attachment; filename="txt.patch"

The "attachment" forces Mozilla to display the helper app dialog..
(bz would know the answer but he doesn't read bugmail... )
and Mozilla wnats to save "txt.diff.txt" is correct because it's a text-File and
many helper fails if you try to open a text-file with other extensions.

I think this is a dupe of bug 185618.

Mozilla would display it if you add a "Inline" into the header :

Content-Disposition: inline; filename="test.diff"


*** This bug has been marked as a duplicate of 185618 ***
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE

Comment 4

15 years ago
v
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.