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 Lukasa, barry, demian.brecht, icordasc, martin.panter, mgdelmonte, piotr.dobrogost, r.david.murray
Date 2016-09-09.18:09:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I think you can greatly simplify this code by using BytesFeedParser and feeding the input to it line by line.  You don't need to gather the headers first, since you control how much you read and how much you send to the parser.  The change to email is then the handling of lines without colons.  The simplest fix is to add a policy control for whether a line-that-doesn't-look-like-a-header is considered part of the preceding header or treated as part of the body (or, to put it another way, do we really only believe the body starts after a blank line or not).  You can make that a setting on Policy, and derive the policy used here in http from Compat32, so as to otherwise minimize the behavior changes.  If we can't get this done by the beta cutoff on Monday, we can make the new policy setting start with an '_' in 3.6, since the point here is the bug fix, not the feature; and then make it public in 3.7 (since I think it is useful for more than just http).
Date User Action Args
2016-09-09 18:09:19r.david.murraysetrecipients: + r.david.murray, barry, martin.panter, piotr.dobrogost, icordasc, demian.brecht, Lukasa, mgdelmonte
2016-09-09 18:09:19r.david.murraysetmessageid: <>
2016-09-09 18:09:19r.david.murraylinkissue24363 messages
2016-09-09 18:09:19r.david.murraycreate