New submission from Lang Martin <lang.mar...@gmail.com>:

on line 765 of client/http.py, the client loops over the read method, sending 
it's content to the web server. It appears as though the send method should 
return at this point; instead it falls through and attempts to send the data 
object through first self.sock.sendall, falling back to the iterable interface.

The result is that a readable data object must support a null __iter__ method, 
or if it supports both a working read and __iter__, the data will be sent to 
the server twice.

Change the break on line 768 to a return, and the expected behavior happens.

----------
messages: 143227
nosy: langmartin
priority: normal
severity: normal
status: open
title: http client attempts to send a readable object twice
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12860>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to