|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47925 PHPClient can't decompress response (transposed uncompress methods?)
Submitted: 2009-04-08 11:26 UTC Modified: 2009-04-16 10:37 UTC
Avg. Score:4.4 ± 0.9
Reproduced:11 of 11 (100.0%)
Same Version:2 (18.2%)
Same OS:6 (54.5%)
From: gt-dev at gthomas dot homelinux dot org Assigned:
Status: Open Package: SOAP related
PHP Version: 5.2CVS-2009-04-08 (snap) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: gt-dev at gthomas dot homelinux dot org
New email:
PHP Version: OS:


 [2009-04-08 11:26 UTC] gt-dev at gthomas dot homelinux dot org
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"

"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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-21 15:32 UTC] tigerincanada at gmail dot com
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(
        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.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 01 07:01:28 2023 UTC