Last Comment Bug 308321 - Detaching attachment should remove any Content-Transfer-Encoding header
: Detaching attachment should remove any Content-Transfer-Encoding header
Status: RESOLVED FIXED
: fixed1.8
Product: MailNews Core
Classification: Components
Component: Attachments (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: David :Bienvenu
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-13 06:28 PDT by u69748
Modified: 2008-07-31 01:21 PDT (History)
0 users
mscott: blocking1.8b5+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
sample mbox which contains 2 message (1.83 KB, text/plain)
2005-09-13 06:34 PDT, u69748
no flags Details
screen shot (9.64 KB, image/png)
2005-09-13 06:37 PDT, u69748
no flags Details
proposed fix (1.81 KB, patch)
2005-09-13 13:33 PDT, David :Bienvenu
mscott: superreview+
mscott: approval1.8b5+
Details | Diff | Review

Description u69748 2005-09-13 06:28:22 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050907 (No IDN) Firefox/1.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050907 (No IDN) Firefox/1.4

Detached message is displayed incorrectly in inline mode, if message body is empty

Reproducible: Always

Steps to Reproduce:
1.Create empty message with text attachment
2 [review].Detach attachment
3 [review].Set inline mode
4.View message

Actual Results:  
Message is displayed incorrectly

Expected Results:  
Message view shoud be empty
Comment 1 u69748 2005-09-13 06:34:39 PDT
Created attachment 195863 [details]
sample mbox which contains 2 message

message 1: original empty message with text attachment
message 2: detached message
Comment 2 u69748 2005-09-13 06:37:49 PDT
Created attachment 195864 [details]
screen shot
Comment 3 u69748 2005-09-13 06:53:09 PDT
I'm using Thunderbird 1.5 Beta 1
Comment 4 Mike Cowperthwaite 2005-09-13 10:17:52 PDT
Reproduced with TB 1.6a1-0904, 1.5b1-0904, Win2K.  It's not dependent on the 
message body being empty.

The problem has to do with this header:
  Content-Transfer-Encoding: base64
not being removed when the new headers are written out:

Content-Type: text/plain;
 name="test.txt"
Content-Transfer-Encoding: base64    <-   TAKE THIS OUT
Content-Disposition: attachment; filename="test.txt"
X-Mozilla-External-Attachment-URL: file:///C:/test.txt
X-Mozilla-Altered: AttachmentDetached; date="Tue Sep 13 22:06:38 2005"

The C-T-E header *is* copied to the "detachment body" text showing the original 
headers.  I assume this same issue applies for quoted-printable (which will 
cause display issues with any '=' signs in the original headers).
Comment 5 David :Bienvenu 2005-09-13 13:15:05 PDT
I think this should block 1.8b5 - I'll look into it.
Comment 6 David :Bienvenu 2005-09-13 13:33:22 PDT
Created attachment 195935 [details] [diff] [review]
proposed fix

don't write out transfer-encoding.
Comment 7 Scott MacGregor 2005-09-13 20:12:42 PDT
this is a 1.8b5 blocker for thunderbird
Comment 8 Scott MacGregor 2005-09-13 20:13:38 PDT
Comment on attachment 195935 [details] [diff] [review]
proposed fix

david, is this code that's only fired when we are writing out a message whose
attachment has been deleted?
Comment 9 David :Bienvenu 2005-09-13 20:46:25 PDT
yes, only for when attachments are detached (not even deleted, just detached)

Note You need to log in before you can comment on or make changes to this bug.