Commit 02671850 authored by Senthil Kumaran's avatar Senthil Kumaran

Fix for Issue13684 - httplib tunnel infinite loop

parent eda1959d
......@@ -748,7 +748,11 @@ class HTTPConnection:
line = response.fp.readline(_MAXLINE + 1)
if len(line) > _MAXLINE:
raise LineTooLong("header line")
if line == '\r\n': break
if not line:
# for sites which EOF without sending trailer
break
if line == '\r\n':
break
def connect(self):
......
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