Deflate decompression error with PHP 5.3.0 and IIS 7
|Reported by:||amattie||Owned by:||dd32|
When using the HTTP class with IIS 7 and PHP 5.3.0 with deflate compression is enabled (disabled by default on IIS 7), it seems that deflate decompression doesn't work. The error I'm seeing is:
Warning: gzuncompress() [function.gzuncompress]: data error in C:\Projects\WordPress\wp-includes\http.php on line 1820
The response stream is properly compressed with deflate compression according to other tools I've used to test this. It seems that the error has something to do with the functionality in the relatively recent implementation of the WP_Http_Encoding->compatible_gzinflate method. If I change the WP_Http_Encoding->decompress method to simply call gzinflate on the first line instead of WP_Http_Encoding::compatible_gzinflate, I don't see the error anymore and the HTTP class appears to properly decompress the deflate stream.
I'm not sure if this error is related specifically to IIS 7 or if instead the broken functionality that necessitated the addition of the compatible_gzinflate method has been fixed in a recent version of PHP.