From f1ffd164405721c71e3d7af25c3aaff2e3bfb968 Mon Sep 17 00:00:00 2001 From: dd32 Date: Thu, 29 Sep 2011 02:10:35 +0000 Subject: [PATCH] Document the Magic numbering in WP_Http_Encoding::compatible_gzinflate(). Fixes #18273 git-svn-id: http://svn.automattic.com/wordpress/trunk@18806 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-http.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 9e2458cb7..8940fdd16 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -1625,11 +1625,17 @@ class WP_Http_Encoding { * Decompression of deflated string while staying compatible with the majority of servers. * * Certain Servers will return deflated data with headers which PHP's gziniflate() - * function cannot handle out of the box. The following function lifted from - * http://au2.php.net/manual/en/function.gzinflate.php#77336 will attempt to deflate - * the various return forms used. + * function cannot handle out of the box. The following function has been created from + * various snippets on the gzinflate() PHP documentation. + * + * Warning: Magic numbers within. Due to the potential different formats that the compressed + * data may be returned in, some "magic offsets" are needed to ensure proper decompression + * takes place. For a simple progmatic way to determine the magic offset in use, see: + * http://core.trac.wordpress.org/ticket/18273 * * @since 2.8.1 + * @link http://core.trac.wordpress.org/ticket/18273 + * @link http://au2.php.net/manual/en/function.gzinflate.php#70875 * @link http://au2.php.net/manual/en/function.gzinflate.php#77336 * * @param string $gzData String to decompress.