Edit report at https://bugs.php.net/bug.php?id=60842&edit=1
ID: 60842 Updated by: il...@php.net Reported by: 120122 at jxs dot nl Summary: CR+LF bug on chunk_size -Status: Open +Status: Closed Type: Bug Package: SOAP related Operating System: any PHP Version: 5.3.9 -Assigned To: +Assigned To: iliaa Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2012-03-08 20:14:17] il...@php.net Automatic comment from SVN on behalf of iliaa Revision: http://svn.php.net/viewvc/?view=revision&revision=324027 Log: Fixed bug #60842, #51775 (Chunked response parsing error when chunksize length line is > 10 bytes). ------------------------------------------------------------------------ [2012-01-22 22:24:05] 120122 at jxs dot nl 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 this bug report at https://bugs.php.net/bug.php?id=60842&edit=1