Bug 800891

Summary: Patches are mangled when sent: an extra space is added on all lines beginning with a space
Product: [Fedora] Fedora Reporter: Denys Vlasenko <dvlasenk>
Component: thunderbirdAssignee: Martin Stransky <stransky>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: gecko-bugs-nobody, stransky
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-08 10:50:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.