ID: 38331 Updated by: [EMAIL PROTECTED] Reported By: ulhin at tdc dot dk -Status: Feedback +Status: Assigned Bug Type: SOAP related Operating System: Red Hat Enterprise Linux 4 PHP Version: 5.1.4 -Assigned To: +Assigned To: dmitry
Previous Comments: ------------------------------------------------------------------------ [2006-08-04 19:07:07] schack at tdconline dot dk No change with http://snaps.php.net/php5.2-latest.tar.gz (php5.2-200608041430) Timeout is still not working. ------------------------------------------------------------------------ [2006-08-04 14:10:53] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip ------------------------------------------------------------------------ [2006-08-04 14:08:40] ulhin at tdc dot dk Description: ------------ There seems to no way to abort a soap call when the response is chunked and none of the chunks exceed the timeout specified with ini_set('default_socket_timeout', 3). Reproduce code: --------------- ###### File: client.php ini_set('default_socket_timeout', 3); $client = new SoapClient(NULL, array( "location" => "http://foobar.dk/soap/server.php", "uri" => "urn:xmethods-delayed-quotes", "style" => SOAP_RPC, "use" => SOAP_ENCODED, "trace" => 1, "connection_timeout" => 3 ) ); $response = ' [NO RESPONSE] '; try { $response = $client->__call( "getQuote", array(new SoapParam("ibm", "symbol")), array("uri" => "urn:xmethods-delayed-quotes", "soapaction" => "urn:xmethods-delayed-quotes#getQuote") ); } catch(Exception $e) { print "Exception: " . $e->getMessage(); } print $response; ###### File: server.php <?php print '<?xml version="1.0" encoding="UTF-8"?>'; for ($i=0; $i<20; $i++) { print "<!-- $i -->"; flush(); // The client will wait 20 seconds for the response. Without flush the client will drop the request after 3 seconds. sleep(1); } ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:xmethods-delayed-quotes" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns1:getQuoteResponse> <Result xsi:type="xsd:float">198.4234</Result> </ns1:getQuoteResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Expected result: ---------------- The call duration should be about 3 seconds. Actual result: -------------- The actual call duration is 20 seconds. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38331&edit=1