mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
SF bug [ 600488 ] Robustness tweak to httplib.py
If the transfer-encoding is unknown, ignore it. Suggested by Tom Emerson.
This commit is contained in:
parent
6e813188db
commit
d229b3ae04
1 changed files with 1 additions and 3 deletions
|
|
@ -304,9 +304,7 @@ class HTTPResponse:
|
||||||
|
|
||||||
# are we using the chunked-style of transfer encoding?
|
# are we using the chunked-style of transfer encoding?
|
||||||
tr_enc = self.msg.getheader('transfer-encoding')
|
tr_enc = self.msg.getheader('transfer-encoding')
|
||||||
if tr_enc:
|
if tr_enc and tr_enc.lower() == "chunked":
|
||||||
if tr_enc.lower() != 'chunked':
|
|
||||||
raise UnknownTransferEncoding()
|
|
||||||
self.chunked = 1
|
self.chunked = 1
|
||||||
self.chunk_left = None
|
self.chunk_left = None
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue