fixes Bug 718: Bad charset in cached pages.
authorZheng Zhu <zhengzhu@users.mediawiki.org>
Mon, 18 Oct 2004 18:13:39 +0000 (18:13 +0000)
committerZheng Zhu <zhengzhu@users.mediawiki.org>
Mon, 18 Oct 2004 18:13:39 +0000 (18:13 +0000)
includes/CacheManager.php

index ab6c66d..e611737 100644 (file)
@@ -92,11 +92,14 @@ class CacheManager {
        
        /* Working directory to/from output */
        function loadFromFileCache() {
-               global $wgOut;
+               global $wgOut, $wgMimeType, $wgOutputEncoding, $wgContLanguageCode;
                wfDebug(" loadFromFileCache()\n");
                
                $filename=$this->fileCacheName();
                $wgOut->sendCacheControl();
+
+               header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" );
+               header( "Content-language: $wgContLanguageCode" );
                
                if( $this->useGzip() ) {
                        if( wfClientAcceptsGzip() ) {