diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-04-29 02:40:23 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-04-29 02:40:23 (GMT) |
commit | 150c36543065821f8dc12af4eca200b6a414bb8c (patch) | |
tree | a2fe48bbd407d1ba52cdd4b2fcd462b3b64427d4 /Lib/http | |
parent | 889ad16e5453ccb2ac4faef34adf24615646c149 (diff) | |
parent | 7e70a5c16918386ced63a36efb79257b75fa7500 (diff) | |
download | cpython-150c36543065821f8dc12af4eca200b6a414bb8c.zip cpython-150c36543065821f8dc12af4eca200b6a414bb8c.tar.gz cpython-150c36543065821f8dc12af4eca200b6a414bb8c.tar.bz2 |
httplib - minor update to check empty response
Diffstat (limited to 'Lib/http')
-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 eb857c0..9c110d5 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -557,7 +557,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 def _readall_chunked(self): @@ -789,7 +789,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): |