From 6ecf45991822e2dc772d371cc34eac49fe0c168e Mon Sep 17 00:00:00 2001 From: rob1n Date: Wed, 2 May 2007 02:36:44 +0000 Subject: [PATCH] Don't double encode gzip output if gzip is already set in php.ini. Props welcomb. fixes #4205 for 2.2 git-svn-id: http://svn.automattic.com/wordpress/branches/2.2@5372 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/tinymce/tiny_mce_gzip.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/js/tinymce/tiny_mce_gzip.php b/wp-includes/js/tinymce/tiny_mce_gzip.php index 59af4b6b5c..14ffba3723 100644 --- a/wp-includes/js/tinymce/tiny_mce_gzip.php +++ b/wp-includes/js/tinymce/tiny_mce_gzip.php @@ -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; }