mirror of
https://github.com/python/cpython.git
synced 2025-10-26 19:24:34 +00:00
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.) |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| client.py | ||
| cookiejar.py | ||
| cookies.py | ||
| server.py | ||