summaryrefslogtreecommitdiff
path: root/Lib/http/client.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-04-23 13:50:05 -0400
committerBenjamin Peterson <benjamin@python.org>2012-04-23 13:50:05 -0400
commit9bc36530831b3b59b68b0579aeb01cd27ea36c20 (patch)
tree44bbc2caba84e803133e097cfb517d93e6bba2a7 /Lib/http/client.py
parentdb780d0d13976b099b22bc5145a53ec3ff6c63ba (diff)
parent8c52ab597f6f3fc17bdcd157ed53c88e016ae2bb (diff)
downloadcpython-git-9bc36530831b3b59b68b0579aeb01cd27ea36c20.tar.gz
merge heads
Diffstat (limited to 'Lib/http/client.py')
-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 0002072ff2..eb857c03ca 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -786,6 +786,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