]> granicus.if.org Git - python/commitdiff
SF bug [ 600488 ] Robustness tweak to httplib.py
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 3 Sep 2002 19:24:24 +0000 (19:24 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 3 Sep 2002 19:24:24 +0000 (19:24 +0000)
If the transfer-encoding is unknown, ignore it.  Suggested by Tom
Emerson.

Lib/httplib.py

index e58a30a12e9c9096142af0ef3360b0ed09506850..b9dc6e9cb57927c1b73d1ecbfd63a589650db028 100644 (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: