Message225562
| 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: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 |
|