diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2008-02-12 18:48:23 (GMT) |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2008-02-12 18:48:23 (GMT) |
| commit | e9c996c14db994fb0afe806a0eee16a97b587fc1 (patch) | |
| tree | b3de06471c5008203ce3a38a64f1ad5651e1c1a1 /Lib/httplib.py | |
| parent | cab74c8398cc83cc40feee189425274bc8722ba9 (diff) | |
| download | cpython-e9c996c14db994fb0afe806a0eee16a97b587fc1.zip cpython-e9c996c14db994fb0afe806a0eee16a97b587fc1.tar.gz cpython-e9c996c14db994fb0afe806a0eee16a97b587fc1.tar.bz2 | |
Patch #1966: Break infinite loop in httplib when the servers
implements the chunked encoding incorrectly.
Diffstat (limited to 'Lib/httplib.py')
| -rw-r--r-- | Lib/httplib.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 403e4ee..137a9ea 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -571,6 +571,10 @@ class HTTPResponse: ### note: we shouldn't have any trailers! while True: line = self.fp.readline() + if not line: + # a vanishingly small number of sites EOF without + # sending the trailer + break if line == '\r\n': break |
