[issue3243] Support iterable bodies in httplib

Senthil Kumaran report at bugs.python.org
Thu Dec 2 03:40:52 CET 2010


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

On Wed, Dec 01, 2010 at 05:08:26PM +0000, Antoine Pitrou wrote:
> Antoine Pitrou <pitrou at free.fr> added the comment:
> > if not request.has_header('Content-length'):
> >     if (not hasattr(data, '__read__') and 
> 
> What is __read__ supposed to be?

I don't think is required. The previous 2.x version patch was doing
this just to ensure that it is not file object and then it is a
sequence. (I could not understand why)

Now, when you determine that the sequence can be bytes, bytearray or
array.array then testing for memory view is enough. File objects
without Content-Length would raise an Exception too.

Not required. For the same reason as above.

----------

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


More information about the Python-bugs-list mailing list