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:
Jeremy Hylton 2002-09-03 19:24:24 +00:00
parent 6e813188db
commit d229b3ae04
1 changed files with 1 additions and 3 deletions

View File

@ -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: