diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-04-23 23:53:51 +0800 |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-04-23 23:53:51 +0800 |
commit | aa872d1690ef3a53358176cc7b0c5a8982178ce2 (patch) | |
tree | f8f91c498e73533d4555d1911bd8709b7a7e7024 | |
parent | 99e6f87586cd11d0d881891851c831a8d7ebb902 (diff) | |
parent | b12771ab3048bb61b3dc09fd21198613f43fa030 (diff) | |
download | cpython-git-aa872d1690ef3a53358176cc7b0c5a8982178ce2.tar.gz |
3.2 - Fix for Issue13684 - httplib tunnel infinite loop
-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 0002072ff2..eb857c03ca 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 |