cpython/Lib/http
R David Murray cae7bdb424 #3566: Clean up handling of remote server disconnects.
This changeset does two things: introduces a new RemoteDisconnected exception
(that subclasses ConnectionResetError and BadStatusLine) so that a remote
server disconnection can be detected by client code (and provides a better
error message for debugging purposes), and ensures that the client socket is
closed if a ConnectionError happens, so that the automatic re-connection code
can work if the application handles the error and continues on.

Tests are added that confirm that a connection is re-used or not re-used
as appropriate to the various combinations of protocol version and headers.

Patch by Martin Panter, reviewed by Demian Brecht.  (Tweaked only slightly by
me.)
2015-04-05 19:26:29 -04:00
..
__init__.py Issue #23442: Rename two member names to stay backward compatible 2015-02-20 14:57:31 +02:00
client.py #3566: Clean up handling of remote server disconnects. 2015-04-05 19:26:29 -04:00
cookiejar.py Issue #22831: Use "with" to avoid possible fd leaks. 2015-04-04 11:01:02 +03:00
cookies.py #2211: properly document the Morsel behavior changes. 2015-03-29 17:09:21 -04:00
server.py Issue #21793: BaseHTTPRequestHandler again logs response code as numeric, 2015-03-07 11:51:37 +02:00