PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Web Services » XML_RPC » Bug #4757

requests are serviced twice, resulting in errors

Details

Submitted2005-07-06 09:01 UTC
Frommsmulders at pronexus dot nl
Assigneddanielc
StatusClosed
PackageXML_RPC
PHP Version4.3.10
OSGNU/Linux
Roadmaps(Not assigned)

Comments

[2005-07-06 09:01 UTC] msmulders at pronexus dot nl

Description:
------------
When using $serviceNow=0 in the Server constructor, the actual method is called and serviced by calling createServerPayload() and createServerHeaders().
However when calling $rpcserver->service(); lateron the function service() calls createServerPayload() and createServerHeaders() AGAIN!! This results in all the code getting executed twice, resulting in errors for example if one uses session_start() in the called rpc method.

Expected result:
----------------
When using $serviceNow=0 the service() function should only output header+data, since it is already made available by the constructor. It should NOT call createServerPayload() and createServerHeaders() again.

OR the createServerPayload() and createServerHeaders() should not be called in the constructor at all, but only by service()... just like it was in earlier versions of XML-RPC

[2005-07-06 18:55 UTC] pbaena at gmail dot com

You beat me by a few hours on reporting this!

I confirm that this is happening. I did some research, and the function being called twice is actually createServerPayload()
, not createServerHeaders().

The service() function is called only once. The problem was inserted from XML_RPC version 1.2.2 to version 1.3.0RC1.