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 scharron
Recipients scharron
Date 2014-08-20.10:02:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408528953.84.0.772180232607.issue22233@psf.upfronthosting.co.za>
In-reply-to
Content
In some cases, the headers from http.client (that uses email.feedparser) splits headers at wrong separators. The bug is from the use of str.splitlines (in email.feedparser) that splits on other characters than \r\n as it should. (See bug http://bugs.python.org/issue22232)

To reproduce the bug : 

import http.client
c = http.client.HTTPSConnection("graph.facebook.com")
c.request("GET", "/%C4%85", None, {"test": "\x85"})
r = c.getresponse()
print(r.headers)
print(r.headers.keys())
print(r.headers.get("WWW-Authenticate"))

As you can see, the WWW-Authenticate is wrongly parsed (it misses its final "), and therefore the rest of the headers are ignored.
History
Date User Action Args
2014-08-20 10:02:33scharronsetrecipients: + scharron
2014-08-20 10:02:33scharronsetmessageid: <1408528953.84.0.772180232607.issue22233@psf.upfronthosting.co.za>
2014-08-20 10:02:33scharronlinkissue22233 messages
2014-08-20 10:02:33scharroncreate