summaryrefslogtreecommitdiffstats
path: root/Lib/http
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/http')
-rw-r--r--Lib/http/client.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py
index 745b999..6828f14 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -715,6 +715,9 @@ class HTTPConnection:
line = response.fp.readline(_MAXLINE + 1)
if len(line) > _MAXLINE:
raise LineTooLong("header line")
+ if not line:
+ # for sites which EOF without sending a trailer
+ break
if line == b'\r\n':
break