[Checkins] SVN: zope.publisher/trunk/ Fix bug where paster would hang when serving xml-rpc requests. See https://bugs.launchpad.net/grok/+bug/332063

Baiju M mbaiju at zeomega.com
Wed Mar 24 23:06:25 EDT 2010


On Thu, Mar 25, 2010 at 3:14 AM, Kevin Teague <kevin at bud.ca> wrote:
> 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

I think you forgot test for this fix.

Regards,
Baiju M


>
> -=-
> 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.
>
> _______________________________________________
> checkins mailing list
> checkins at zope.org
> https://mail.zope.org/mailman/listinfo/checkins
>


More information about the checkins mailing list