summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):