[Python-checkins] python/dist/src/Lib httplib.py,1.79,1.80

loewis at users.sourceforge.net loewis at users.sourceforge.net
Mon Oct 27 09:07:56 EST 2003


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv30650/Lib

Modified Files:
	httplib.py 
Log Message:
Patch #817854: Add missing operations for SSLFile. Fixes #792101.
Backported to 2.3.


Index: httplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v
retrieving revision 1.79
retrieving revision 1.80
diff -C2 -d -r1.79 -r1.80
*** httplib.py	29 Jun 2003 17:55:05 -0000	1.79
--- httplib.py	27 Oct 2003 14:07:53 -0000	1.80
***************
*** 911,914 ****
--- 911,939 ----
              return line
  
+     def readlines(self, sizehint=0):
+         total = 0
+         list = []
+         while True:
+             line = self.readline()
+             if not line:
+                 break
+             list.append(line)
+             total += len(line)
+             if sizehint and total >= sizehint:
+                 break
+         return list
+ 
+     def fileno(self):
+         return self._sock.fileno()
+ 
+     def __iter__(self):
+         return self
+ 
+     def next(self):
+         line = self.readline()
+         if not line:
+             raise StopIteration
+         return line
+ 
  class FakeSocket(SharedSocketClient):
  





More information about the Python-checkins mailing list