diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-04-23 15:53:51 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-04-23 15:53:51 (GMT) |
commit | aa872d1690ef3a53358176cc7b0c5a8982178ce2 (patch) | |
tree | f8f91c498e73533d4555d1911bd8709b7a7e7024 /Lib/http/client.py | |
parent | 99e6f87586cd11d0d881891851c831a8d7ebb902 (diff) | |
parent | b12771ab3048bb61b3dc09fd21198613f43fa030 (diff) | |
download | cpython-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.py | 3 |
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 |