wfDebug(" loadFromFileCache()\n");
$filename = $this->fileCacheName();
- $wgOut->sendCacheControl();
+ // Raw pages will handle control on their own
+ if( $this->mType !== 'raw' )
+ $wgOut->sendCacheControl();
header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" );
header( "Content-language: $wgContLanguageCode" );
if( $wgUseFileCache && isset($wgTitle) ) {
wfProfileIn( 'main-try-filecache' );
- if( HTMLFileCache::useFileCache() ) {
+ // Raw pages should handle control on their own
+ // even when using file cache.
+ if( $action != 'raw' && HTMLFileCache::useFileCache() ) {
/* Try low-level file cache hit */
$cache = new HTMLFileCache( $wgTitle, $action );
if( $cache->isFileCacheGood( /* Assume up to date */ ) ) {