Closed Bug 304783 Opened 19 years ago Closed 19 years ago

Attaching PDF results in "Content-type: text/html" header attachment

Categories

(Thunderbird :: Message Compose Window, defect)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

VERIFIED WORKSFORME

People

(Reporter: drm, Assigned: mscott)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

When attaching a PDF to a new message, sending of the message results in the PDF
body to be attached with a content-type: text/html header.

The source of the message displays:

----
--------------070602020801070103010408
Content-Type: text/html;
 name="992266.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="992266.pdf"
----

This problem occurs when composing in text mode only, and when

Reproducible: Always

Steps to Reproduce:
1. Create new mail message
2. Attach a pdf file, either by dragging/dropping or via attach toolbarbutton
3. Send the message to yourself
4. View the source of the message, or see the attachment icon being an HTML icon.

Actual Results:  
- I see both an HTML icon next to attachment (which is probably a result of the
following)
- The content-type header of the attachment part of the message is set to be
"text/html"

The main problem here is that SPAM filters scan the text/html parts of the
messages, which virtually almost concludes the message to be spam. Conclusively,
i can't send any e-mail whatsoever containing PDF attachments!

So, i file this bug to be major, though normally it would classify "normal".
Feel free to change the status if you think otherwise.

Expected Results:  
application/pdf or application/octet-stream content-type header
Duplicate of Core bug 276409?
I see i posted an incorrect comment
"This problem occurs when composing in text mode only, and when"

That's not the case, it also happens when composing in HTML mode. 

In reply to zug_treno@yahoo.com:

I don't use the Mozilla Application suite, and I didn't think Thunderbird and
Firefox are integrated at that level, are they? I do have a historical copy of
the Mozilla Application Suite installed, and changed the prefs as stated in that
bug, but it had no effect.
Assuming you're using Thunderbird 1.0.x (information that you *should* have 
provided in the original bug report):
  Tools | Options | Attachments
There's probably a PDF entry in the File Types table.  Select it and click 
Remove.  Exit program, restart.  Compose a new message, attach PDF file: same 
problem?

If you're using a nightly build, then:
  Tools | Options | Attachments | View & Edit Actions
There's probably a PDF entry in the File Types table.  Select it and click 
**Edit** (not Remove).  The assocated MIME type is displayed at the top of the 
dialog -- is it "text/html"?  If so, close the window, and *now* click Remove, 
exit and restart, etc.

If either of those courses of actions solves your problem, please mark this bug 
Resolved | WorksForMe.  See also bug 244618.
(In reply to comment #3)
> Assuming you're using Thunderbird 1.0.x (information that you *should* have 
> provided in the original bug report):

I am using 1.0.6, sorry for that.

>   Tools | Options | Attachments
> There's probably a PDF entry in the File Types table.  Select it and click 
> Remove.  Exit program, restart.  Compose a new message, attach PDF file: same 
> problem?

The file types table is empty. That was one of the first things i checked myself.

I also checked the windows registry for html <-> pdf associations but couldn't
find anything there as well. Maybe i overlooked something. Does Thunderbird
check with the registry when attaching?

(In reply to comment #4)
> (In reply to comment #3)
> >   Tools | Options | Attachments
> > There's probably a PDF entry in the File Types table.  Select it and click 
> > Remove.  Exit program, restart.  Compose a new message, attach PDF file:
> > same problem?
> 
> The file types table is empty. That was one of the first things i checked
> myself.

Please locate the mimeTypes.rdf file in your profile directory and attach it to 
this bug (using the Create New Attachment link above).


> I also checked the windows registry for html <-> pdf associations but couldn't
> find anything there as well. Maybe i overlooked something. Does Thunderbird
> check with the registry when attaching?

I'm not sure whether it checks the registry when attaching; I've tried making 
various entries in the registry, but haven't gotten TB to recognize them while 
attaching.
TB will, in some circumstances, check the registry while opening an attachment.
(In reply to comment #5)
> Please locate the mimeTypes.rdf file in your profile directory and attach it to 
> this bug (using the Create New Attachment link above).

Hmmm i think i found the problem:

<RDF:Description RDF:about="urn:mimetype:text/html"
                   NC:description="Adobe Acrobat Document"
                   NC:value="text/html"
                   NC:editable="true">
    <NC:fileExtensions>pdf</NC:fileExtensions>
    <NC:fileExtensions>htm</NC:fileExtensions>
    <NC:handlerProp RDF:resource="urn:mimetype:handler:text/html"/>
  </RDF:Description>

I really have no idea whatsoever how it ended up there. 

As i remove the line with file extension PDF:
    <NC:fileExtensions>htm</NC:fileExtensions>

the result is as expected: problem solved.....

this is ...... "peculiar" .... to say the least.

> I'm not sure whether it checks the registry when attaching; I've tried making 
> various entries in the registry, but haven't gotten TB to recognize them while 
> attaching.

I didn't think so as well.

> TB will, in some circumstances, check the registry while opening an attachment.

I thought i recognized that in the registry indeed... otoh that doesn't give any
problems...

Well, i marked the bug "works for me", but maybe this is a lead to find out how
that link between .pdf extensions and text/html content-type got into the
mimeTypes.rdf file in the first place ....

Thanks for your help, all :)
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
(In reply to comment #6)
> (In reply to comment #5)
> > Please locate the mimeTypes.rdf file in your profile directory and attach
> > it to this bug (using the Create New Attachment link above).
> 
> Hmmm i think i found the problem:
> 
> <RDF:Description RDF:about="urn:mimetype:text/html"
>                    NC:description="Adobe Acrobat Document"
>                    NC:value="text/html"
>                    NC:editable="true">
>     <NC:fileExtensions>pdf</NC:fileExtensions>
>     <NC:fileExtensions>htm</NC:fileExtensions>
>     <NC:handlerProp RDF:resource="urn:mimetype:handler:text/html"/>
>   </RDF:Description>
> 
> I really have no idea whatsoever how it ended up there. 
> 
> As i remove the line with file extension PDF:
>     <NC:fileExtensions>htm</NC:fileExtensions>
> 
> the result is as expected: problem solved.....

You *only* removed the "pdf" file extension?  So the description field still 
reads "Adobe Acrobat Document"?

I'd remove the entire block, if it were my system; or at least edit it so it 
correctly reads "HTML file".
Status: RESOLVED → VERIFIED
(In reply to comment #7)
> You *only* removed the "pdf" file extension?  So the description field still 
> reads "Adobe Acrobat Document"?
> 
> I'd remove the entire block, if it were my system; or at least edit it so it 
> correctly reads "HTML file".

Obviously, you're right, but it didn't concern the problem. Just removing the
line pointed out the source of the problem. Thanks anyway :)
You need to log in before you can comment on or make changes to this bug.