summaryrefslogtreecommitdiff
path: root/Lib/http/client.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-04-29 10:40:23 +0800
committerSenthil Kumaran <senthil@uthcode.com>2012-04-29 10:40:23 +0800
commit150c36543065821f8dc12af4eca200b6a414bb8c (patch)
treea2fe48bbd407d1ba52cdd4b2fcd462b3b64427d4 /Lib/http/client.py
parent889ad16e5453ccb2ac4faef34adf24615646c149 (diff)
parent7e70a5c16918386ced63a36efb79257b75fa7500 (diff)
downloadcpython-git-150c36543065821f8dc12af4eca200b6a414bb8c.tar.gz
httplib - minor update to check empty response
Diffstat (limited to 'Lib/http/client.py')
-rw-r--r--Lib/http/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py
index eb857c03ca..9c110d5a04 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):