[issue3243] Support iterable bodies in httplib

Senthil Kumaran report at bugs.python.org
Thu Dec 2 04:23:01 CET 2010


Senthil Kumaran <orsenthil at gmail.com> added the comment:

On Thu, Dec 02, 2010 at 03:16:53AM +0000, Xuanji Li wrote:
> And my version too...
> 

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

This is very special case. It should not be so. There was wrong
examples in the test_urllib2 which I just corrected.

Expect for the difference in (it = iter(data) - Which I am seeking
some advice too). Rest of the things in both patches are same.

Thank you.

----------

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


More information about the Python-bugs-list mailing list