Closed Bug 300027 Opened 19 years ago Closed 19 years ago

[FIXr]text document on Web sent as mail attachment has MIME type application/x-vnd.mozilla.maybe-text

Categories

(MailNews Core :: Attachments, defect, P1)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: andrew, Assigned: bzbarsky)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511

If the Mozilla browser displays a page explicitly declared as text/plain,
if the  File->Send Page feature is used to mail it to someone, it is sent
as an attachment of type Application/X-VND.MOZILLA.MAYBE-TEXT (not understood
by mail client) instead of text/plain. I guess someone had a reason for
doing it this way, but it is a bit annoying in an application we are using.

Reproducible: Always

Steps to Reproduce:
1.Display plain text document
2.Send page to recipient
3.Read email in e.g. Pine

Actual Results:  
Mail arrived as Application/X-VND.MOZILLA.MAYBE-TEXT attachment. I had to
configure a program to handle it, or save as file then view in an external editor

Expected Results:  
Mail arrive as text/plain, would be displayed as inline attachment or viewed
in default text viewer.
You can get around this by delivering with a different encoding than ISO-8859-1
(UTF8 works).  Apache 2.x by deafult sends "text/plain; charset=ISO-8859-1" for
anything it doesn't recognize.

This is fallout from bug 220807
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Summary: text document on Web sent as mail attachment does not have text/plain MIME type → text document on Web sent as mail attachment has MIME type application/x-vnd.mozilla.maybe-text
I'm a little confused about the sequence of events that could lead to this...
and I can't reproduce it in a trunk build, more importantly.
Attached patch Patch to fixSplinter Review
The problem is that mailnews uses an nsIURIContentListener that accepts all
types...  This patch fixes the problem (I had to deal with the magic "binary,
guess from extension" type that the binary detector produces as well...).
Attachment #188859 - Flags: superreview?(darin)
Attachment #188859 - Flags: review?(cbiesinger)
Assignee: nobody → bzbarsky
Severity: minor → normal
Priority: -- → P1
Summary: text document on Web sent as mail attachment has MIME type application/x-vnd.mozilla.maybe-text → [FIX]text document on Web sent as mail attachment has MIME type application/x-vnd.mozilla.maybe-text
Target Milestone: --- → mozilla1.8beta4
Comment on attachment 188859 [details] [diff] [review]
Patch to fix

Looks good to me, sr=darin
Attachment #188859 - Flags: superreview?(darin) → superreview+
Comment on attachment 188859 [details] [diff] [review]
Patch to fix

why does this fix things? Don't you need to set the type on the channel too,
around here:
+    // Reset to application/octet-stream for now; no one other than the
+    // external helper app service should see APPLICATION_GUESS_FROM_EXT.
+    mContentType = APPLICATION_OCTET_STREAM;
Yes, I do!  Consider that fixed.
Comment on attachment 188859 [details] [diff] [review]
Patch to fix

ok, r=biesi with that change
Attachment #188859 - Flags: review?(cbiesinger) → review+
Comment on attachment 188859 [details] [diff] [review]
Patch to fix

Requesting 1.8b4 approval.  This is a quite safe change that makes our internal
MIME types not leak out of the browser to other apps.
Attachment #188859 - Flags: approval1.8b4?
Summary: [FIX]text document on Web sent as mail attachment has MIME type application/x-vnd.mozilla.maybe-text → [FIXr]text document on Web sent as mail attachment has MIME type application/x-vnd.mozilla.maybe-text
Attachment #188859 - Flags: approval1.8b4? → approval1.8b4+
Fixed.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: