#38331 [NEW]: SOAP call timeout when the response is chunked

From: Date: Fri, 04 Aug 2006 14:08:40 +0000
Subject: #38331 [NEW]: SOAP call timeout when the response is chunked
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100341@lists.php.net to get a copy of this message
From: ulhin at tdc dot dk Operating system: Red Hat Enterprise Linux 4 PHP version: 5.1.4 PHP Bug Type: SOAP related Bug description: SOAP call timeout when the response is chunked 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 bug report at http://bugs.php.net/?id=38331&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38331&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38331&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38331&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38331&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38331&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38331&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38331&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38331&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38331&r=support Expected behavior: http://bugs.php.net/fix.php?id=38331&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38331&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38331&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38331&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38331&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38331&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38331&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38331&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38331&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38331&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38331&r=mysqlcfg

« previous php.bugs (#100341) next »