diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-04-23 15:50:07 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-04-23 15:50:07 (GMT) |
commit | b12771ab3048bb61b3dc09fd21198613f43fa030 (patch) | |
tree | 5d3650394dafb8f6eeb36dedcc73f4f13300566d /Lib/http | |
parent | 2cc52efa7c968b6dcf1efcd3cc4f804c447b4814 (diff) | |
download | cpython-b12771ab3048bb61b3dc09fd21198613f43fa030.zip cpython-b12771ab3048bb61b3dc09fd21198613f43fa030.tar.gz cpython-b12771ab3048bb61b3dc09fd21198613f43fa030.tar.bz2 |
3.2 - Fix for Issue13684 - httplib tunnel infinite loop
Diffstat (limited to 'Lib/http')
-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 745b999..6828f14 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -715,6 +715,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 |