From 85b6246b45037bc5b7afdd068ff00ae2768afd69 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 11 Feb 2009 15:07:18 +0000 Subject: [PATCH] (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. --- RELEASE-NOTES | 2 ++ includes/HTMLFileCache.php | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2b34bc89c0..430bd80eab 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -158,6 +158,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 17341) "Powered by MediaWiki" should be on the left on RTL wikis * (bug 17404) "userrights-interwiki" right was missing in User::$mCoreRights * (bug 7509) Separation strings should be configurable +* (bug 17420) Send the correct content type from action=raw when the HTML file + cache is enabled. == API changes in 1.15 == * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions diff --git a/includes/HTMLFileCache.php b/includes/HTMLFileCache.php index ab3c964540..e267962c58 100644 --- a/includes/HTMLFileCache.php +++ b/includes/HTMLFileCache.php @@ -132,11 +132,11 @@ class HTMLFileCache { $filename = $this->fileCacheName(); // Raw pages should handle cache control on their own, // even when using file cache. This reduces hits from clients. - if( $this->mType !== 'raw' ) + if( $this->mType !== 'raw' ) { $wgOut->sendCacheControl(); - - header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" ); - header( "Content-language: $wgContLanguageCode" ); + header( "Content-Type: $wgMimeType; charset={$wgOutputEncoding}" ); + header( "Content-Language: $wgContLanguageCode" ); + } if( $this->useGzip() ) { if( wfClientAcceptsGzip() ) { -- 2.20.1