Support output_handler = ob_gzhandler in script/style compressor, props DD32, fixes #9000

git-svn-id: http://svn.automattic.com/wordpress/trunk@10466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-01-30 13:45:05 +00:00
parent 94ac6098e2
commit e62f8c0eb9
2 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ function get_file($path) {
while ( @ob_end_clean() );
if ( isset($_GET['test']) && 1 == $_GET['test'] ) {
if ( ini_get('zlib.output_compression') )
if ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') )
exit('');
$out = 'var wpCompressionTest = 1;';
@ -143,7 +143,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') ) {
if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') ) {
header('Vary: Accept-Encoding'); // Handle proxies
if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
header('Content-Encoding: deflate');

View File

@ -127,7 +127,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') ) {
if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') ) {
header('Vary: Accept-Encoding'); // Handle proxies
if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
header('Content-Encoding: deflate');