Kaydet (Commit) 7e70a5c1 authored tarafından Senthil Kumaran's avatar Senthil Kumaran

httplib - minor update to check empty response

üst 9c29f86a
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment