From 94e8f63eb738ca4985992a554c04e1d6aba0bcac Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 20 Feb 2007 04:58:54 +0000 Subject: [PATCH] Don't suppress gzip mode for zero-length output; failing to send the Content-Encoding header with 304 responses confuses some browsers. --- includes/OutputHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' ); -- 2.20.1