This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients barry, mmasztalerczuk, r.david.murray, Константин Волков
Date 2016-10-18.16:49:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1476809347.5.0.473707884404.issue28463@psf.upfronthosting.co.za>
In-reply-to
Content
It is a bug, but it is not a bug that the message-id body gets put on a second line.  The old (compat32) folder introduces an extra space while folding, which then gets preserved when the re-parsing is done.  The new folder (policy=default) folds correctly (putting the id on a separate line), but the parser fails to remove the leading blank from the value when it is parsed.  It should remove the leading blank because that blank "belongs" to the header label (the "Message-Id:" part).  The RFC caution about whitespace only lines applies to whole lines; the first line in the present example is not blank because it has the header label on it.

I also need to add a test with a Message-Id that is in itself longer than 77 characters.  Such a header can't be folded, so it will have to be emitted with a length longer than the default.  (And yes, the default can be changed to any value you like, see Policy.max_line_len).
History
Date User Action Args
2016-10-18 16:49:07r.david.murraysetrecipients: + r.david.murray, barry, Константин Волков, mmasztalerczuk
2016-10-18 16:49:07r.david.murraysetmessageid: <1476809347.5.0.473707884404.issue28463@psf.upfronthosting.co.za>
2016-10-18 16:49:07r.david.murraylinkissue28463 messages
2016-10-18 16:49:07r.david.murraycreate