]> granicus.if.org Git - python/commit
Fix some string encoding issues with entity bodies in HTTP requests.
authorJeremy Hylton <jeremy@alum.mit.edu>
Fri, 27 Mar 2009 20:24:34 +0000 (20:24 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Fri, 27 Mar 2009 20:24:34 +0000 (20:24 +0000)
commit236654b82df30b2df5edf72cd808f792cdde9d3a
treebf699a151050ff282f72d178273daf8a5b3fa1f4
parent98eb6c283881168adbedf37bb34300c39954397a
Fix some string encoding issues with entity bodies in HTTP requests.

RFC 2616 says that iso-8859-1 is the default charset for HTTP entity
bodies, but we encoded strings using ascii.  See
http://bugs.python.org/issue5314.  Changed docs and code to use
iso-8859-1.

Also fix some brokenness with passing a file as the body instead of a
string.

Add tests to show that some of this behavior actually works.
Doc/library/http.client.rst
Lib/http/client.py
Lib/test/test_httplib.py