Message144433
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. |
|
Date |
User |
Action |
Args |
2011-09-22 23:54:34 | vstinner | set | recipients:
+ vstinner, terry.reedy, orsenthil, eric.araujo, r.david.murray, ssbarnea, thijs, Adam.Cohen |
2011-09-22 23:54:34 | vstinner | set | messageid: <1316735674.87.0.76035264682.issue12398@psf.upfronthosting.co.za> |
2011-09-22 23:54:34 | vstinner | link | issue12398 messages |
2011-09-22 23:54:33 | vstinner | create | |
|