[Python-checkins] python/dist/src/Lib httplib.py,1.64,1.65

jhylton@users.sourceforge.net jhylton@users.sourceforge.net
2002年9月03日 12:24:26 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv16398
Modified Files:
	httplib.py 
Log Message:
SF bug [ 600488 ] Robustness tweak to httplib.py
If the transfer-encoding is unknown, ignore it. Suggested by Tom
Emerson.
Index: httplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** httplib.py	8 Aug 2002 20:19:18 -0000	1.64
--- httplib.py	3 Sep 2002 19:24:24 -0000	1.65
***************
*** 305,311 ****
 # 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()
 self.chunked = 1
 self.chunk_left = None
--- 305,309 ----
 # are we using the chunked-style of transfer encoding?
 tr_enc = self.msg.getheader('transfer-encoding')
! if tr_enc and tr_enc.lower() == "chunked":
 self.chunked = 1
 self.chunk_left = None

AltStyle によって変換されたページ (->オリジナル) /