diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-04-29 02:39:49 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-04-29 02:39:49 (GMT) |
commit | 7e70a5c16918386ced63a36efb79257b75fa7500 (patch) | |
tree | 4606f282a996c0204f7825759ce7a3a75a15c09b /Lib | |
parent | 9c29f86a81d159eaa7be47f0de7c78f7a88d78fd (diff) | |
download | cpython-7e70a5c16918386ced63a36efb79257b75fa7500.zip cpython-7e70a5c16918386ced63a36efb79257b75fa7500.tar.gz cpython-7e70a5c16918386ced63a36efb79257b75fa7500.tar.bz2 |
httplib - minor update to check empty response
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/http/client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py index 6828f14..d226f63 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -563,7 +563,7 @@ class HTTPResponse(io.RawIOBase): # a vanishingly small number of sites EOF without # sending the trailer break - if line == b"\r\n": + if line in (b'\r\n', b'\n', b''): break # we read everything; close the "file" @@ -718,7 +718,7 @@ class HTTPConnection: if not line: # for sites which EOF without sending a trailer break - if line == b'\r\n': + if line in (b'\r\n', b'\n', b''): break def connect(self): |