Kaydet (Commit) b12771ab authored tarafından Senthil Kumaran's avatar Senthil Kumaran

3.2 - Fix for Issue13684 - httplib tunnel infinite loop

üst 2cc52efa
...@@ -715,6 +715,9 @@ class HTTPConnection: ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment