Antoine Pitrou added the comment:
This is now fixed in all branches. Thanks for the report!
--
resolution: - fixed
stage: - resolved
status: open - closed
versions: +Python 2.7
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 371cf371a6a1 by Antoine Pitrou in branch '2.7':
Issue #23576: Avoid stalling in SSL reads when EOF has been reached in the SSL
layer but the underlying connection hasn't been closed.
https://hg.python.org/cpython/rev/371cf371a6a1
--
nosy:
Roundup Robot added the comment:
New changeset 01cf9ce75eda by Antoine Pitrou in branch '3.4':
Issue #23576: Avoid stalling in SSL reads when EOF has been reached in the SSL
layer but the underlying connection hasn't been closed.
https://hg.python.org/cpython/rev/01cf9ce75eda
New changeset
New submission from Cory Benfield:
Initially reported on the requests bug list at
https://github.com/kennethreitz/requests/issues/2467
In cases when a remote web server sends a non-chunked response that does not
have a content length, it is possible to get http.client to hang on a read. To
Changes by Zachary Salzbank z...@key.me:
--
nosy: +Zachary Salzbank
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23576
___
___
Python-bugs-list
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: +demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23576
___
___
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net:
--
nosy: +piotr.dobrogost
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23576
___
___
Antoine Pitrou added the comment:
Reproducing seems a bit irregular. Note that the last bytestring (the empty
bytestring) is what takes time to read.
Also note that HTTPResponse is a buffered I/O object, so normally you don't
need to read up to the empty string. You can stop when you got less
Antoine Pitrou added the comment:
Varying reproduceability may have to do with sleepy-reaches-6892.herokuapp.com
resolving to different endpoints (that domain name has a stupidly small TTL, by
the way).
Anyway, for an unknown reason the following patch seems to fix the issue.
--