--- CacheManager.php Tue Aug 10 17:36:21 2004 +++ CacheManager.php.patched Tue Aug 10 17:29:35 2004 @@ -90,15 +90,11 @@ $wgOut->sendCacheControl(); if( $this->useGzip() ) { - if( wfClientAcceptsGzip() ) { - header( 'Content-Encoding: gzip' ); - } else { - /* Send uncompressed */ - readgzfile( $filename ); - return; - } + readgzfile( $filename ); + } else { + readfile( $filename ); } - readfile( $filename ); + return; } function checkCacheDirs() { @@ -122,27 +118,18 @@ if($f) { $now = wfTimestampNow(); if( $this->useGzip() ) { - $rawtext = str_replace( '', + $text = str_replace( '', '\n", $text ); - $text = gzencode( $rawtext ); + $saveas = gzencode( $text ); } else { $text = str_replace( '', '\n", $text ); + $saveas = &$text; } - fwrite( $f, $text ); + fwrite( $f, $saveas ); fclose( $f ); - if( $this->useGzip() ) { - if( wfClientAcceptsGzip() ) { - header( 'Content-Encoding: gzip' ); - return $text; - } else { - return $rawtext; - } - } else { - return $text; - } } return $text; }