Bug 800891 - Patches are mangled when sent: an extra space is added on all lines beginning with a space
Patches are mangled when sent: an extra space is added on all lines beginning...
Product: Fedora
Classification: Fedora
Component: thunderbird (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Martin Stransky
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-03-07 08:18 EST by Denys Vlasenko
Modified: 2012-03-08 07:43 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-03-08 05:50:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Denys Vlasenko 2012-03-07 08:18:55 EST
Compose and send the following text email to yourself:


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


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 05:22:17 EST
Huh, you're right. But it's displayed correctly...
Comment 2 Martin Stransky 2012-03-08 05:31:12 EST
Hm, if the line begins with space, extra space is added.
Comment 3 Martin Stransky 2012-03-08 05:50:42 EST
Upstream bug - https://bugzilla.mozilla.org/show_bug.cgi?id=141983
Comment 4 Denys Vlasenko 2012-03-08 07:43:51 EST
(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.