Commit aa872d16 authored by Senthil Kumaran's avatar Senthil Kumaran

3.2 - Fix for Issue13684 - httplib tunnel infinite loop

parents 99e6f875 b12771ab
......@@ -786,6 +786,9 @@ class HTTPConnection:
line = response.fp.readline(_MAXLINE + 1)
if len(line) > _MAXLINE:
raise LineTooLong("header line")
if not line:
# for sites which EOF without sending a trailer
break
if line == b'\r\n':
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