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: Closed Package: SOAP related
PHP Version: 5.2CVS-2009-04-08 (snap) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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
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

Pull Requests

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.
 [2024-05-27 17:28 UTC] git@php.net
Automatic comment on behalf of nielsdos
Revision: https://github.com/php/php-src/commit/35e62e9b590690f24fe78e3097d5bddcfb913e61
Log: Fix bug #47925: PHPClient can't decompress response (transposed uncompress methods?)
 [2024-05-27 17:28 UTC] git@php.net
-Status: Open +Status: Closed
 [2024-05-29 15:51 UTC] git@php.net
Automatic comment on behalf of nielsdos (author) and web-flow (committer)
Revision: https://github.com/php/php-src/commit/ce7ed6e040f4c57604a19e6a7d2ed5e401f6f02d
Log: Fix bug #47925 again (#14348)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 12:01:29 2025 UTC