[Checkins] SVN: zope.publisher/ Pass the size argument to readline. Twisted now supports it.

Christophe Combelles ccomb at free.fr
Fri Aug 15 13:21:04 EDT 2008


Log message for revision 89888:
  Pass the size argument to readline. Twisted now supports it.
  

Changed:
  U   zope.publisher/branches/3.4/src/zope/publisher/http.py
  U   zope.publisher/trunk/src/zope/publisher/http.py

-=-
Modified: zope.publisher/branches/3.4/src/zope/publisher/http.py
===================================================================
--- zope.publisher/branches/3.4/src/zope/publisher/http.py	2008-08-15 17:00:31 UTC (rev 89887)
+++ zope.publisher/branches/3.4/src/zope/publisher/http.py	2008-08-15 17:21:04 UTC (rev 89888)
@@ -212,12 +212,10 @@
         return data
 
     def readline(self, size=None):
-        # XXX We should pass the ``size`` argument to self.stream.readline
-        # but twisted.web2.wsgi.InputStream.readline() doesn't accept it.
-        # See http://www.zope.org/Collectors/Zope3-dev/535 and
-        #     http://twistedmatrix.com/trac/ticket/1451
+        # Previous versions of Twisted did not support the ``size`` argument
+        # See http://twistedmatrix.com/trac/ticket/1451
         #     https://bugs.launchpad.net/zope3/+bug/98284
-        data = self.stream.readline()
+        data = self.stream.readline(size)
         self.cacheStream.write(data)
         return data
 

Modified: zope.publisher/trunk/src/zope/publisher/http.py
===================================================================
--- zope.publisher/trunk/src/zope/publisher/http.py	2008-08-15 17:00:31 UTC (rev 89887)
+++ zope.publisher/trunk/src/zope/publisher/http.py	2008-08-15 17:21:04 UTC (rev 89888)
@@ -213,12 +213,10 @@
         return data
 
     def readline(self, size=None):
-        # XXX We should pass the ``size`` argument to self.stream.readline
-        # but twisted.web2.wsgi.InputStream.readline() doesn't accept it.
-        # See http://www.zope.org/Collectors/Zope3-dev/535 and
-        #     http://twistedmatrix.com/trac/ticket/1451
+        # Previous versions of Twisted did not support the ``size`` argument
+        # See http://twistedmatrix.com/trac/ticket/1451
         #     https://bugs.launchpad.net/zope3/+bug/98284
-        data = self.stream.readline()
+        data = self.stream.readline(size)
         self.cacheStream.write(data)
         return data
 



More information about the Checkins mailing list