mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
Patch #1966: Break infinite loop in httplib when the servers
implements the chunked encoding incorrectly.
This commit is contained in:
parent
cab74c8398
commit
e9c996c14d
2 changed files with 7 additions and 0 deletions
|
@ -571,6 +571,10 @@ class HTTPResponse:
|
||||||
### note: we shouldn't have any trailers!
|
### note: we shouldn't have any trailers!
|
||||||
while True:
|
while True:
|
||||||
line = self.fp.readline()
|
line = self.fp.readline()
|
||||||
|
if not line:
|
||||||
|
# a vanishingly small number of sites EOF without
|
||||||
|
# sending the trailer
|
||||||
|
break
|
||||||
if line == '\r\n':
|
if line == '\r\n':
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,9 @@ Core and builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Patch #1966: Break infinite loop in httplib when the servers
|
||||||
|
implements the chunked encoding incorrectly.
|
||||||
|
|
||||||
- tarfile.py: Fix reading of xstar archives.
|
- tarfile.py: Fix reading of xstar archives.
|
||||||
|
|
||||||
- #2021: Allow tempfile.NamedTemporaryFile to be used in with statements
|
- #2021: Allow tempfile.NamedTemporaryFile to be used in with statements
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue