[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

Demian Brecht report at bugs.python.org
Sun Jan 4 07:46:17 CET 2015


Demian Brecht added the comment:

utf-8 encoding is only one step in IRI encoding. Correct IRI encoding is non trivial and doesn't fall into the support policy for 2.7 (bug/security fixes). I think that the best that can be done for 2.7 is to enhance the documentation around HTTPConnection.__init__ (unicode hostnames should be IDNA-encoded with the built-in IDNA encoder) and HTTPConnection.request/putrequest noting that unicode paths should be IRI encoded, with a link to RFC 3987.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22231>
_______________________________________


More information about the Python-bugs-list mailing list