From: Operating system: any PHP version: 5.3.9 Package: SOAP related Bug Type: Bug Bug description:CR+LF bug on chunk_size
Description: ------------ The soap extension has a bug in parsing the chunk_size of messages with Transfer-Encoding: chunked. When the other end is sending CR+LF (a Windows server), only the CR is read to the chunk_size variable, while the LF is prepended to the message body. In that case, the actual XML message is one byte short at the end. This issue was reported before ( https://bugs.php.net/bug.php?id=51775 ), but never fixed. Test script: --------------- <?php $client = new SoapClient("ProcessExternalUser.wsdl", array( "location" => "http://webservices-acc.cibg.nl/Ribiz/Openbaar.asmx", "uri" => "http://services.cibg.nl/ExternalUser/ListHcpApprox", 'trace'=>1 ) ); $message = new stdClass(); $message->WebSite = 'Ribiz'; $message->RegistrationNumber = '59023925501'; $x=$client->ListHcpApprox($message); print_r($x); Expected result: ---------------- stdClass Object ( [ListHcpApprox] => stdClass Object ( [ListHcpApprox] => stdClass Object ( [HcpNumber] => 239255 [BirthSurname] => Smalen [Prefix] => de ... Actual result: -------------- PHP Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http body, No Content-Length, connection closed or chunked data in /home/jxs.nl/a.php:13 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://webservi...', 'http://services...', 1, 0) #1 /home/jxs.nl/soap/a.php(13): SoapClient->__call('ListHcpApprox', Array) #2 /home/jxs.nl/soap/a.php(13): SoapClient->ListHcpApprox(Object(stdClass)) #3 {main} thrown in /home/jxs.nl/soap/a.php on line 13 -- Edit bug report at https://bugs.php.net/bug.php?id=60842&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60842&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60842&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60842&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60842&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60842&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60842&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60842&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60842&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60842&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60842&r=support Expected behavior: https://bugs.php.net/fix.php?id=60842&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60842&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60842&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60842&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60842&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60842&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60842&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60842&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60842&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60842&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60842&r=mysqlcfg