Message144433
| Author |
vstinner |
| Recipients |
Adam.Cohen, eric.araujo, orsenthil, r.david.murray, ssbarnea, terry.reedy, thijs, vstinner |
| Date |
2011年09月22日.23:54:33 |
| SpamBayes Score |
5.3774636e-07 |
| Marked as misclassified |
No |
| Message-id |
<1316735674.87.0.76035264682.issue12398@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Here is a patch for httplib encoding HTTP headers to ISO-8859-1, as done in Python 3 (see HTTPConnection.putheader() from http.client). urllib is not affected by this issue because it does already encode Unicode, but encode to ASCII instead of ISO-8859-1.
Related commit in Python 3:
changeset: 67720:b3cadf5cf742
user: Armin Ronacher <armin.ronacher@active-4.com>
date: Sat Jan 22 13:44:22 2011 +0000
files: Lib/http/client.py Lib/test/test_httpservers.py Misc/NEWS
description:
To match the behaviour of HTTP server, the HTTP client library now also encodes headers with iso-8859-1 (latin1) encoding. It was already doing that for incoming headers which makes this behaviour now consistent in both incoming and outgoing direction. |
|