This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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