--- /usr/share/php/HTTP/Request2/Response.orig.php 2009-08-29 10:52:32.000000000 -0700
+++ /usr/share/php/HTTP/Request2/Response.php 2009-08-29 10:52:21.000000000 -0700
@@ -423,6 +423,10 @@
*/
public static function decodeGzip($data)
{
+ if (function_exists('mb_substr') && (2 & ini_get('mbstring.func_overload'))) {
+ $oldEncoding = mb_internal_encoding();
+ mb_internal_encoding('iso-8859-1');
+ }
$length = strlen($data);
// If it doesn't look like gzip-encoded data, don't bother
if (18 > $length || strcmp(substr($data, 0, 2), "\x1f\x8b")) {
@@ -502,6 +506,10 @@
} elseif ((0xffffffff & $dataCrc) != (0xffffffff & crc32($unpacked))) {
throw new HTTP_Request2_Exception('Data CRC check failed');
}
+
+ if (function_exists('mb_substr') && (2 & ini_get('mbstring.func_overload'))) {
+ mb_internal_encoding($oldEncoding);
+ }
return $unpacked;
}
@@ -525,4 +533,4 @@
return (0 == $header[1] % 31)? gzuncompress($data): gzinflate($data);
}
}
-?>
\ No newline at end of file
+?>