Document the Magic numbering in WP_Http_Encoding::compatible_gzinflate(). Fixes #18273

git-svn-id: https://develop.svn.wordpress.org/trunk@18806 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2011-09-29 02:10:35 +00:00
parent 36f2e9a22f
commit 6069fe3c61

View File

@ -1625,11 +1625,17 @@ class WP_Http_Encoding {
* Decompression of deflated string while staying compatible with the majority of servers. * Decompression of deflated string while staying compatible with the majority of servers.
* *
* Certain Servers will return deflated data with headers which PHP's gziniflate() * Certain Servers will return deflated data with headers which PHP's gziniflate()
* function cannot handle out of the box. The following function lifted from * function cannot handle out of the box. The following function has been created from
* http://au2.php.net/manual/en/function.gzinflate.php#77336 will attempt to deflate * various snippets on the gzinflate() PHP documentation.
* the various return forms used. *
* 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 * @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 * @link http://au2.php.net/manual/en/function.gzinflate.php#77336
* *
* @param string $gzData String to decompress. * @param string $gzData String to decompress.