summaryrefslogtreecommitdiffstats
path: root/Lib/http/client.py
diff options
context:
space:
mode:
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 9b01704..6a4496f 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -536,6 +536,9 @@ class HTTPResponse(io.RawIOBase):
self.length -= n
if not self.length:
self.close()
+ else:
+ if not n:
+ self.close()
return n
def _read_next_chunk_size(self):