Martin Panter added the comment:

Sorry but I have a few concerns about your patch:

Why does this have to be in the HTTPConnection.send() method? Why can’t you do 
the file rewinding yourself, when you retry the request?

This could break compatibility if someone wrote code that expects data to be 
sent from a non-zero file position.

I think this would be new feature (for the next version of Python), and 
couldn’t be accepted as a bug fix for 2.7.

See also Issue 9740 (persistent HTTP client connections), where I suggested a 
few things you mentioned, including polling for an unsolicited response or 
closed connection, and reconnecting before sending a request.

Also beware that a general HTTP client shouldn’t automatically retry idempotent 
requests if there is a chance that the original request was already received. 
PUT is idempotent so that is okay. POST is not, however.

----------
nosy: +martin.panter

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

Reply via email to