New submission from Samuel Charron: 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. ---------- components: Library (Lib) messages: 225562 nosy: scharron priority: normal severity: normal status: open title: http.client splits headers on none-\r\n characters type: behavior versions: Python 3.4, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22233> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com