Edit report at http://bugs.php.net/bug.php?id=47925&edit=1
ID: 47925 Comment by: tigerincanada at gmail dot com Reported by: gt-dev at gthomas dot homelinux dot org Summary: PHPClient can't decompress response (transposed uncompress methods?) Status: Open Type: Bug Package: SOAP related Operating System: * PHP Version: 5.2CVS-2009-04-08 (snap) Block user comment: N Private report: N New Comment: I have the same error using Deflate to connect to a SOAP service on a .Net server, so PHP appears to have an issue decoding any Deflate response. Here's the code I'm using: $example = new SoapClient( 'https://www.example.com/service.asmx?WSDL', array( 'exceptions' => true, 'trace' => true, 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_DEFLATE | 5 ) ); This bug has been open for nearly two years, and fixing it would save significant amounts of bandwidth for SOAP-intensive jobs like interfacing with ERP systems. Previous Comments: ------------------------------------------------------------------------ [2009-04-08 11:26:22] gt-dev at gthomas dot homelinux dot org Description: ------------ I created a SOAP server, the client uses PHP as a client. If I compress the output, the client says: "Can't uncompress compressed response" Server-side: "gzip" content-encoding uses zlib with the gzip wrap (header, crc and length) and -zlib.MAX_WBITS parameter; "deflate" uses zlib without the wrap with zlib.MAX_WBITS parameter. Client-side: soap.c line 1509 says "gzip" content-encoding results use of "gzinflate" "deflate" results "gzuncompress" use. Am I wrong, but I think deflate's pair is inflate, so "gzip" content-encoding should result the use of "gzuncompress", and "deflate" to "gzinflate", corresponding. Expected result: ---------------- The parse of the uncompressed SOAP result. Actual result: -------------- SoapFault exception: [HTTP] Can't uncompress compressed response in /var/www/tarifa/kgfb_tarifa/tarifa_kgfb_kobe.php:47 Stack trace: #0 [internal function]: SoapClient->__doRequest('__call('db_web__login', Array) #2 /var/www/tarifa/kgfb_tarifa/tarifa_kgfb_kobe.php(47): SoapClient->db_web__login(Array) #3 /var/www/tarifa/tarifa_kgfb.php(4101): kobe_tarifa('550101', '681653', '15', 0.734246575342, '2010-01-01 00:0...') #4 {main}REQUEST: b1000745XyF27mI9 RESPONSE: RESPONSE HEADERS: HTTP/1.1 200 OK Date: Wed, 08 Apr 2009 09:15:08 GMT Vary: accept-encoding Content-Encoding: gzip Content-Type: text/xml;charset=utf-8 Server: Twisted/8.1.0 TwistedWeb/[twisted.web2, version 0.2.0+r22791] Transfer-Encoding: chunked Connection: close ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=47925&edit=1