r47139 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47138‎ | r47139 | r47140 >
Date:15:07, 11 February 2009
Author:tstarling
Status:ok
Tags:
Comment:
(bug 17420) Send the correct content type from action=raw when the HTML file cache is enabled. Regression due to r45123/r45126. Will be backported to the 1.14 branch.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/HTMLFileCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HTMLFileCache.php
@@ -132,12 +132,12 @@
133133 $filename = $this->fileCacheName();
134134 // Raw pages should handle cache control on their own,
135135 // even when using file cache. This reduces hits from clients.
136 - if( $this->mType !== 'raw' )
 136+ if( $this->mType !== 'raw' ) {
137137 $wgOut->sendCacheControl();
 138+ header( "Content-Type: $wgMimeType; charset={$wgOutputEncoding}" );
 139+ header( "Content-Language: $wgContLanguageCode" );
 140+ }
138141
139 - header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" );
140 - header( "Content-language: $wgContLanguageCode" );
141 -
142142 if( $this->useGzip() ) {
143143 if( wfClientAcceptsGzip() ) {
144144 header( 'Content-Encoding: gzip' );
Index: trunk/phase3/RELEASE-NOTES
@@ -158,6 +158,8 @@
159159 * (bug 17341) "Powered by MediaWiki" should be on the left on RTL wikis
160160 * (bug 17404) "userrights-interwiki" right was missing in User::$mCoreRights
161161 * (bug 7509) Separation strings should be configurable
 162+* (bug 17420) Send the correct content type from action=raw when the HTML file
 163+ cache is enabled.
162164
163165 == API changes in 1.15 ==
164166 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Follow-up revisions

RevisionCommit summaryAuthorDate
r47140Backport of r47139, RawPage file cache fixtstarling15:16, 11 February 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45123Enable filecache for raw page hits if $wgUseFileCache is onaaron13:32, 28 December 2008
r45126FileCache tweaks:...aaron15:03, 28 December 2008

Status & tagging log