[Checkins] SVN: zope.publisher/trunk/ Fix bug where paster would hang when serving xml-rpc requests. See https://bugs.launchpad.net/grok/+bug/332063
Kevin Teague
kevin at bud.ca
Wed Mar 24 17:44:36 EDT 2010
Log message for revision 110174:
Fix bug where paster would hang when serving xml-rpc requests. See https://bugs.launchpad.net/grok/+bug/332063
Changed:
U zope.publisher/trunk/CHANGES.txt
U zope.publisher/trunk/src/zope/publisher/xmlrpc.py
-=-
Modified: zope.publisher/trunk/CHANGES.txt
===================================================================
--- zope.publisher/trunk/CHANGES.txt 2010-03-24 16:12:44 UTC (rev 110173)
+++ zope.publisher/trunk/CHANGES.txt 2010-03-24 21:44:35 UTC (rev 110174)
@@ -4,7 +4,8 @@
3.12.2 (unreleased)
-------------------
-- ...
+- Fixed bug where xml-rpc requests would hang when served using
+ paster.httpserver.
3.12.1 (2010-02-21)
-------------------
Modified: zope.publisher/trunk/src/zope/publisher/xmlrpc.py
===================================================================
--- zope.publisher/trunk/src/zope/publisher/xmlrpc.py 2010-03-24 16:12:44 UTC (rev 110173)
+++ zope.publisher/trunk/src/zope/publisher/xmlrpc.py 2010-03-24 21:44:35 UTC (rev 110174)
@@ -46,10 +46,15 @@
'See IPublisherRequest'
# Parse the request XML structure
- # XXX using readlines() instead of lines()
- # as twisted's BufferedStream sends back
- # an empty stream here for read() (bug)
- lines = ''.join(self._body_instream.readlines())
+ # Using lines() does not work as Twisted's BufferedStream sends back
+ # an empty stream here for read() (bug). Using readlines() does not
+ # work with paster.httpserver. However, readline() works fine.
+ lines = ''
+ while True:
+ line = self._body_instream.readline()
+ if not line:
+ break
+ lines += line
self._args, function = xmlrpclib.loads(lines)
# Translate '.' to '/' in function to represent object traversal.
More information about the checkins
mailing list