Closed
Bug 153930
Opened 23 years ago
Closed 16 years ago
Attachments without suffix are given MIME type application/x-java-vm
Categories
(MailNews Core :: MIME, defect)
MailNews Core
MIME
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: thomas.z.bauer, Unassigned)
References
(Depends on 1 open bug)
Details
(Keywords: fixedOEM)
Attachments
(1 obsolete file)
For java runtime environment plugin versions 1.3.1 as well as 1.4.1,
mail attachments without suffix are given the wrong MIME type.
E.g., if I send somebody a Makefile in an attachment of a mail,
the Makefile gets MIME type application/x-java-vm.
If the user double-clicks on such a file, mozilla crashes.
I am, however, not sure wether this is a problem of mozilla,
or of the JRE plugins themselves.
Updated•23 years ago
|
QA Contact: gayatri → trix
Comment 1•23 years ago
|
||
I just sent an mbox file to an abuse department (content was a virus). Due to
the absurd content-type the did not want to open it;-)
IOW: Yes, it is a bug and it sucks. If Mozilla cannot determine what a file is
it should ask.
pi
Status: UNCONFIRMED → NEW
Ever confirmed: true
See also bug 141826: mail attachment with mime application/x-java-vm crashes.
OS: Linux → All
Hardware: PC → All
Comment 3•23 years ago
|
||
When add attatchment, Composer first determine its type by look at its
extension. It call mime service GetTypeFromExtension(). The problem is that the
function do not consider the case that the extension is "". Please refer to
nsExternalHelperAppService.cpp,
nsExternalHelperAppService::GetTypeFromExtension().
In GetTypeFromExtension(), it will search the plugin list, and check extension
list of each type. Don't know why, the java plugin's mExtensionArray[] has a
"", it will thus mistakenly think "" is a plugin type.
Thus when no extension exist should not call the function. And the type of the
attachment can be determined later, when reading the data of the attachment, in
OnDataAvailable(), UnknownDecoder::DetermineContentType() be called.
The patch has passed jst-review-simulacrum.
Comment 4•23 years ago
|
||
I have tested it on solaris and windows.
After the patch:
Attach a binary file without extension, the mime type is application/octet-stream.
Attach a text file without extension, the attachment will be regard as txt file.
Comment 5•23 years ago
|
||
I have tested it on solaris and windows.
After the patch:
Attach a binary file without extension, the mime type is application/octet-stream.
Attach a text file without extension, the attachment will be regard as txt file.
Comment 6•23 years ago
|
||
Great job! Thanks for the patch.
Status: NEW → ASSIGNED
Whiteboard: Have fix
Target Milestone: --- → mozilla1.2alpha
Comment 7•23 years ago
|
||
Comment on attachment 95846 [details] [diff] [review]
patch for review
R=ducarroz
Attachment #95846 -
Flags: review+
Comment 8•23 years ago
|
||
Comment on attachment 95846 [details] [diff] [review]
patch for review
sr=bienvenu
Attachment #95846 -
Flags: superreview+
Comment 9•23 years ago
|
||
Fix checked in the trunk. Thanks Yuedong Du for providing the patch.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 10•23 years ago
|
||
Thanks to all, the bug is removed in nightly build 2002082122.
Comment 11•23 years ago
|
||
martinl@netscape.com has checked this patch into OEM branch on 8/26.
Mark 'fixedOEM'.
martinl, if something wrong, correct me.
Whiteboard: Have fix, branchOEM+ → Have fix, branchOEM+, fixedOEM
Comment 12•23 years ago
|
||
The fix did not make it into 1.1 release. So it should go into 1.11 if this will be.
pi
Comment 13•23 years ago
|
||
Fix works in Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020828.
pi
Comment 14•23 years ago
|
||
This bug exists on the 1.0 branch as well. The fix here seems conservative and
prevents a crash.
Comment 16•22 years ago
|
||
*** Bug 178599 has been marked as a duplicate of this bug. ***
Comment 17•22 years ago
|
||
As a note, this code should just not use GetFromExtension and use GetFromURI
instead, since it has a URI. Then the MIME service would properly handle all
the issues like empty extension and such....
Comment 18•22 years ago
|
||
I reopen this bug to implement new suggestion...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla1.2alpha → mozilla1.3alpha
Updated•22 years ago
|
Target Milestone: mozilla1.3alpha → Future
QA Contact: yulian → stephend
Updated•20 years ago
|
Product: MailNews → Core
Comment 19•20 years ago
|
||
Comment on attachment 95846 [details] [diff] [review]
patch for review
mozilla/mailnews/compose/src/nsMsgSend.cpp 1.313
Attachment #95846 -
Attachment is obsolete: true
Updated•17 years ago
|
Assignee: ducarroz → nobody
Status: REOPENED → NEW
QA Contact: stephend → mime
| Assignee | ||
Updated•17 years ago
|
Product: Core → MailNews Core
Comment 20•16 years ago
|
||
(In reply to comment #19)
> (From update of attachment 95846 [details] [diff] [review])
> mozilla/mailnews/compose/src/nsMsgSend.cpp 1.313
>
Timeless did your last comment meant the bug was fixed ?
Comment 21•16 years ago
|
||
No, he meant that the original patch was in fact checked in a couple of years before that comment, probably adding that comment as part of some sweep looking for reviewed patches that hadn't ever been checked in.
However, comment 17, for which this was then reopened, isn't so straightforward a decision, so I filed bug 483352 for deciding whether the simplicity is worth dropping the "rename changes the mime-type we send" feature.
Status: NEW → RESOLVED
Closed: 23 years ago → 16 years ago
Resolution: --- → FIXED
Target Milestone: Future → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•