diff options
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 9321522..bb873e4 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -596,6 +596,10 @@ class HTTPResponse: ### note: we shouldn't have any trailers! while True: line = self.fp.readline() + if not line: + # a vanishingly small number of sites EOF without + # sending the trailer + break if line == b"\r\n": break |