From: Brion Vibber Date: Tue, 20 Feb 2007 04:58:54 +0000 (+0000) Subject: Don't suppress gzip mode for zero-length output; failing to send the X-Git-Tag: 1.31.0-rc.0~54001 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=94e8f63eb738ca4985992a554c04e1d6aba0bcac;p=lhc%2Fweb%2Fwiklou.git Don't suppress gzip mode for zero-length output; failing to send the Content-Encoding header with 304 responses confuses some browsers. --- diff --git a/includes/OutputHandler.php b/includes/OutputHandler.php index 9272b19bc5..b25cb4fe14 100644 --- a/includes/OutputHandler.php +++ b/includes/OutputHandler.php @@ -22,7 +22,7 @@ function wfOutputHandler( $s ) { * Unlike ob_gzhandler, it works for HEAD requests too. */ function wfGzipHandler( $s ) { - if ( $s !== '' && function_exists( 'gzencode' ) && !headers_sent() ) { + if ( function_exists( 'gzencode' ) && !headers_sent() ) { $tokens = preg_split( '/[,; ]/', $_SERVER['HTTP_ACCEPT_ENCODING'] ); if ( in_array( 'gzip', $tokens ) ) { header( 'Content-Encoding: gzip' );