ZF-6040: decodeDeflate() handles incorrectly


Zend_Http_Response::decodeDeflate's errors"Warning: gzuncompress(): data error " this is maybe same Http_Request2_Response's bug .http://pear.php.net/bugs/bug.php?id=15305.

I found it be solved - override Http_Request2_Response::decodeDeflate method's code


Thanks for reporting and for the link to PEAR - fixed in rev. 17055

It seems this is not enough.

I'm tring to recieve the response from http://www.gbase.de/global/news/0/55322.html, and the body is processed to gzuncompress instead gzinflate (because $zlibHeader[1] % 31 == 0).

I have found a solution at http://php.net/manual/en/…

(ord($body[0]) == 0x78 && in_array(ord($body[1]), array(0x01, 0x5e, 0x9c, 0xda)) is false.

So, it should look like this:

if ($zlibHeader[1] % 31 == 0 && ord($body[0]) == 0x78 && in_array(ord($body[1]), array(0x01, 0x5e, 0x9c, 0xda)) { return gzuncompress($body); }

return gzinflate($body);

Hi Patrick. Thank you for comment. Could you open your suggestion as other issue?