Bug 800891 - Patches are mangled when sent: an extra space is added on all lines beginning with a space
Summary: Patches are mangled when sent: an extra space is added on all lines beginning...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: thunderbird
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Stransky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-07 13:18 UTC by Denys Vlasenko
Modified: 2012-03-08 12:43 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-03-08 10:50:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Denys Vlasenko 2012-03-07 13:18:55 UTC
Compose and send the following text email to yourself:

qwe
 asd
  zxc

Go to 'sent' folder and open it. It looks normal. Press Ctrl-U "see message source" key. I see the following:

qwe
  asd
   zxc

That is, TWO spaces on the second line, not one. And three on the third.
The same can be seen in you save a message to disk.

This breaks patches which are sent via cut-n-paste.

An older bug 618894 seems to be somewhat related to this.

Comment 1 Martin Stransky 2012-03-08 10:22:17 UTC
Huh, you're right. But it's displayed correctly...

Comment 2 Martin Stransky 2012-03-08 10:31:12 UTC
Hm, if the line begins with space, extra space is added.

Comment 3 Martin Stransky 2012-03-08 10:50:42 UTC
Upstream bug - https://bugzilla.mozilla.org/show_bug.cgi?id=141983

Comment 4 Denys Vlasenko 2012-03-08 12:43:51 UTC
(In reply to comment #1)
> Huh, you're right. But it's displayed correctly...

The point is, I sent patches by copy-pasting them into email.
They looked ok (I switched off word wrappping).

But people on the other end got patch failures trying to apply them.

I tried the same: saved my own emails from 'sent' folder as files
and tried to apply them, and to my horror they indeed failed to apply.
I dug deeper into the problem, understood what causes it, and created this bug with detailed explanation what exactly goes wrong.


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