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
|
@ -304,9 +304,7 @@ class HTTPResponse:
|
|||
|
||||
# are we using the chunked-style of transfer encoding?
|
||||
tr_enc = self.msg.getheader('transfer-encoding')
|
||||
if tr_enc:
|
||||
if tr_enc.lower() != 'chunked':
|
||||
raise UnknownTransferEncoding()
|
||||
if tr_enc and tr_enc.lower() == "chunked":
|
||||
self.chunked = 1
|
||||
self.chunk_left = None
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue