mirror of
https://github.com/python/cpython.git
synced 2025-08-28 12:45:07 +00:00
3.2 - Fix for Issue13684 - httplib tunnel infinite loop
This commit is contained in:
parent
2cc52efa7c
commit
b12771ab30
1 changed files with 3 additions and 0 deletions
|
@ -715,6 +715,9 @@ class HTTPConnection:
|
||||||
line = response.fp.readline(_MAXLINE + 1)
|
line = response.fp.readline(_MAXLINE + 1)
|
||||||
if len(line) > _MAXLINE:
|
if len(line) > _MAXLINE:
|
||||||
raise LineTooLong("header line")
|
raise LineTooLong("header line")
|
||||||
|
if not line:
|
||||||
|
# for sites which EOF without sending a trailer
|
||||||
|
break
|
||||||
if line == b'\r\n':
|
if line == b'\r\n':
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue