From: Jeremy Hylton Date: Tue, 3 Sep 2002 19:24:24 +0000 (+0000) Subject: SF bug [ 600488 ] Robustness tweak to httplib.py X-Git-Tag: v2.3c1~4224 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d229b3ae048ca51d9f3865e1e9eaf83ba5a6c424;p=python SF bug [ 600488 ] Robustness tweak to httplib.py If the transfer-encoding is unknown, ignore it. Suggested by Tom Emerson. --- diff --git a/Lib/httplib.py b/Lib/httplib.py index e58a30a12e..b9dc6e9cb5 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -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: