]> git.ipfire.org Git - thirdparty/httpx.git/commit
Check disconnections on connection reacquiry (#145)
authorTom Christie <tom@tomchristie.com>
Thu, 25 Jul 2019 21:52:41 +0000 (22:52 +0100)
committerGitHub <noreply@github.com>
Thu, 25 Jul 2019 21:52:41 +0000 (22:52 +0100)
commitec365c0e8e0c81279dc7a482e038aa5b547261e8
tree252a5bdccfdbcca1c771fe4661e3e707bdbff8ae
parent8db36ed6a537fb2efaf6e5da07102ec0065c498c
Check disconnections on connection reacquiry (#145)

* Detect EOF signaling remote server closed connection

Raise ConnectionClosedByRemote and handle on `send`

* Fix linting

* Use existing NotConnected exception

* Add `Reader.is_connection_dropped` method

* Check connection before sending h11 events as well

* Add test covering connection lost before reading response content

* Check for connection closed on acquiring it from the pool

* Clean up ConnectionPool logic around reaquiry of connections
httpx/concurrency.py
httpx/dispatch/connection.py
httpx/dispatch/connection_pool.py
httpx/dispatch/http11.py
httpx/dispatch/http2.py
httpx/exceptions.py
httpx/interfaces.py
tests/dispatch/test_connection_pools.py
tests/dispatch/test_http2.py
tests/dispatch/utils.py
tests/test_multipart.py