[issue3243] Support iterable bodies in httplib

Xuanji Li report at bugs.python.org
Sun Dec 19 13:47:12 CET 2010


Xuanji Li <xuanji at gmail.com> added the comment:

Also, I am not familiar with the backward-comparability requirements of py3k, but orsenthil's patch will break py3k code that relies on data being a string, shouldn't this be mentioned somewhere?

Finally, I do not understand why my proposed change, which is to add

+    if not data:
+        request.add_unredirected_header('Content-length', '0')


so that code that relies on being able to pass a blank string as data (for instance, the code in test_urllib2.py) is still able to do so.

----------

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


More information about the Python-bugs-list mailing list