mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 14:50:29 +00:00
Check if $_SERVER['HTTP_ACCEPT_ENCODING'] is set before determining whether to compress scripts, props nacin, fixes #11169
git-svn-id: https://develop.svn.wordpress.org/trunk@12214 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -91,6 +91,8 @@ case 'wp-compression-test' :
|
||||
echo $test_str;
|
||||
die;
|
||||
} elseif ( 2 == $_GET['test'] ) {
|
||||
if ( !isset($_SERVER['HTTP_ACCEPT_ENCODING']) )
|
||||
die('-1');
|
||||
if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
|
||||
header('Content-Encoding: deflate');
|
||||
$out = gzdeflate( $test_str, 1 );
|
||||
|
||||
Reference in New Issue
Block a user