php.net |  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
Votes:14
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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
48 - 36 = ?
Subscribe to this entry?

 
 [2009-04-08 11:26 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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(
        '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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC