summaryrefslogtreecommitdiffstats
path: root/Lib/http/client.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-04-23 15:53:51 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-04-23 15:53:51 (GMT)
commitaa872d1690ef3a53358176cc7b0c5a8982178ce2 (patch)
treef8f91c498e73533d4555d1911bd8709b7a7e7024 /Lib/http/client.py
parent99e6f87586cd11d0d881891851c831a8d7ebb902 (diff)
parentb12771ab3048bb61b3dc09fd21198613f43fa030 (diff)
downloadcpython-aa872d1690ef3a53358176cc7b0c5a8982178ce2.zip
cpython-aa872d1690ef3a53358176cc7b0c5a8982178ce2.tar.gz
cpython-aa872d1690ef3a53358176cc7b0c5a8982178ce2.tar.bz2
3.2 - Fix for Issue13684 - httplib tunnel infinite loop
Diffstat (limited to 'Lib/http/client.py')
-rw-r--r--Lib/http/client.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py
index 0002072..eb857c0 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -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