[Python-checkins] python/dist/src/Lib httplib.py,1.78,1.79
jhylton@users.sourceforge.net
jhylton@users.sourceforge.net
2003年6月29日 10:55:08 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv31795/Lib
Modified Files:
httplib.py
Log Message:
Fix sf bug 666219: assertion error in httplib.
The obvious way for this assertion to fail is if the LineAndFileWrapper constructor is called when an empty line. Raise a BadStatusError before the call.
Index: httplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -d -r1.78 -r1.79
*** httplib.py 24 Jun 2003 06:35:19 -0000 1.78
--- httplib.py 29 Jun 2003 17:55:05 -0000 1.79
***************
*** 232,235 ****
--- 232,239 ----
if self.debuglevel > 0:
print "reply:", repr(line)
+ if not line:
+ # Presumably, the server closed the connection before
+ # sending a valid response.
+ raise BadStatusLine(line)
try:
[version, status, reason] = line.split(None, 2)