diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 3829adf76d..90b3353117 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -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 ); diff --git a/wp-admin/load-scripts.php b/wp-admin/load-scripts.php index 957a8cb480..b01ba30e2c 100644 --- a/wp-admin/load-scripts.php +++ b/wp-admin/load-scripts.php @@ -127,7 +127,7 @@ header('Content-Type: application/x-javascript; charset=UTF-8'); header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); header("Cache-Control: public, max-age=$expires_offset"); -if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') ) { +if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) { header('Vary: Accept-Encoding'); // Handle proxies if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { header('Content-Encoding: deflate'); diff --git a/wp-admin/load-styles.php b/wp-admin/load-styles.php index 93584274d9..1e10c47a94 100644 --- a/wp-admin/load-styles.php +++ b/wp-admin/load-styles.php @@ -137,7 +137,7 @@ header('Content-Type: text/css'); header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); header("Cache-Control: public, max-age=$expires_offset"); -if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') ) { +if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) { header('Vary: Accept-Encoding'); // Handle proxies if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { header('Content-Encoding: deflate'); diff --git a/wp-includes/js/tinymce/wp-tinymce.php b/wp-includes/js/tinymce/wp-tinymce.php index efd2f5985f..b2ef19d445 100644 --- a/wp-includes/js/tinymce/wp-tinymce.php +++ b/wp-includes/js/tinymce/wp-tinymce.php @@ -1,4 +1,10 @@