# HG changeset patch # User Dan # Date 1252677324 14400 # Node ID 1a3f374310ca3209426598284a120512d2689827 # Parent c424a15a1656704a086b03b8abc38febd4c957cb Damn it! gzip_output() was not checking for gzip support in the browser, fixed. diff -r c424a15a1656 -r 1a3f374310ca includes/functions.php --- a/includes/functions.php Fri Sep 11 09:54:32 2009 -0400 +++ b/includes/functions.php Fri Sep 11 09:55:24 2009 -0400 @@ -3157,11 +3157,18 @@ { global $do_gzip; + $gzip_supported = false; + if ( isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) + { + $encodings = explode(',', $_SERVER['HTTP_ACCEPT_ENCODING']); + $gzip_supported = in_array('gzip', $encodings) || in_array('deflate', $encodings); + } + // // Compress buffered output if required and send to browser // Sorry, doesn't work in IE. What else is new? // - if ( $do_gzip && function_exists('gzdeflate') && !strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') && !headers_sent() ) + if ( $do_gzip && function_exists('gzdeflate') && !strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') && !headers_sent() && $gzip_supported ) { $gzip_contents = ob_get_contents(); ob_end_clean();