[issue25838] Lib/httplib.py: Resend http request on server close connection

Martin Panter report at bugs.python.org
Sat Dec 12 01:08:40 EST 2015


Martin Panter added the comment:

Okay that makes a lot more sense! I agree that this should either be fixed in httplib2 or in your own script. The problem parallels Issue 5038, where urlopen() is used (rather than httplib2), and the request is retried after getting an authorization failure (rather than after a disconnection).

One option, if you can use Python 3.2+, might be to use a custom iterable object as the body. Then you get a hook to rewind the file every time it is iterated.

----------

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


More information about the Python-bugs-list mailing list