mirror of https://github.com/python/cpython
Patch #1966: Break infinite loop in httplib when the servers
implements the chunked encoding incorrectly.
This commit is contained in:
parent
cab74c8398
commit
e9c996c14d
|
@ -571,6 +571,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 == '\r\n':
|
||||
break
|
||||
|
||||
|
|
Loading…
Reference in New Issue