[Python-checkins] CVS: python/dist/src/Lib httplib.py,1.23,1.24
Jeremy Hylton
python-dev@python.org
Thu, 12 Oct 2000 12:58:40 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.57,2.58
- Next message: [Python-checkins] CVS: python/dist/src/Doc/lib xmlsaxhandler.tex,NONE,1.1 xmlsaxutils.tex,NONE,1.1 xmlsaxreader.tex,NONE,1.1 xmlsax.tex,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv8371/Lib
Modified Files:
httplib.py
Log Message:
If the status line is invalid, assume it is a pre-1.0 response. The
msg/headers are empty and the entire response is treated as the body.
Index: httplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** httplib.py 2000/09/21 22:09:47 1.23
--- httplib.py 2000/10/12 19:58:36 1.24
***************
*** 119,124 ****
reason = ""
except ValueError:
! self.close()
! raise BadStatusLine(line)
if version[:5] != 'HTTP/':
self.close()
--- 119,125 ----
reason = ""
except ValueError:
! version = "HTTP/0.9"
! status = "200"
! reason = ""
if version[:5] != 'HTTP/':
self.close()
***************
*** 130,137 ****
if version == 'HTTP/1.0':
self.version = 10
! elif version[:7] == 'HTTP/1.':
self.version = 11 # use HTTP/1.1 code for HTTP/1.x where x>=1
else:
raise UnknownProtocol(version)
self.msg = mimetools.Message(self.fp, 0)
--- 131,144 ----
if version == 'HTTP/1.0':
self.version = 10
! elif version.startswith('HTTP/1.'):
self.version = 11 # use HTTP/1.1 code for HTTP/1.x where x>=1
+ elif version == 'HTTP/0.9':
+ self.version = 9
else:
raise UnknownProtocol(version)
+
+ if self.version == 9:
+ self.msg = mimetools.Message(StringIO())
+ return
self.msg = mimetools.Message(self.fp, 0)
- Previous message: [Python-checkins] CVS: python/dist/src/Modules mathmodule.c,2.57,2.58
- Next message: [Python-checkins] CVS: python/dist/src/Doc/lib xmlsaxhandler.tex,NONE,1.1 xmlsaxutils.tex,NONE,1.1 xmlsaxreader.tex,NONE,1.1 xmlsax.tex,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]