Message225562
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. |
|
Date |
User |
Action |
Args |
2014-08-20 10:02:33 | scharron | set | recipients:
+ scharron |
2014-08-20 10:02:33 | scharron | set | messageid: <1408528953.84.0.772180232607.issue22233@psf.upfronthosting.co.za> |
2014-08-20 10:02:33 | scharron | link | issue22233 messages |
2014-08-20 10:02:33 | scharron | create | |
|