Don't double encode gzip output if gzip is already set in php.ini. Props
welcomb. fixes #4205 git-svn-id: https://develop.svn.wordpress.org/trunk@5333 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7b24d7882d
commit
510a57a763
|
@ -84,7 +84,7 @@
|
|||
if (isset($_SERVER['HTTP_ACCEPT_ENCODING']))
|
||||
$encodings = explode(',', strtolower(preg_replace("/\s+/", "", $_SERVER['HTTP_ACCEPT_ENCODING'])));
|
||||
|
||||
if ((in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) {
|
||||
if ((in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression') && ini_get('output_handler') != 'ob_gzhandler') {
|
||||
$enc = in_array('x-gzip', $encodings) ? "x-gzip" : "gzip";
|
||||
$supportsGzip = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue