r84060 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84059‎ | r84060 | r84061 >
Date:22:22, 15 March 2011
Author:platonides
Status:ok
Tags:
Comment:
(Bug 28069) MediaWiki fails streaming files when mod_deflate and ob_gzhandler are also set
gzipped content with header: "Content-Encoding: , gzip"
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -1599,7 +1599,13 @@
16001600 if( $status['name'] == 'ob_gzhandler' ) {
16011601 // Reset the 'Content-Encoding' field set by this handler
16021602 // so we can start fresh.
1603 - header( 'Content-Encoding:' );
 1603+ if ( function_exists( 'header_remove' ) ) {
 1604+ // Available since PHP 5.3.0
 1605+ header_remove( 'Content-Encoding' );
 1606+ } else {
 1607+ // We need to provide a valid content-coding. See bug 28069
 1608+ header( 'Content-Encoding: identity' );
 1609+ }
16041610 break;
16051611 }
16061612 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r84062MFT r84060 + RELEASE-NOTES.platonides22:29, 15 March 2011

Status & tagging log