Page MenuHomePhabricator

filecache returns wiki controlled css as type text/html
Closed, ResolvedPublic

Description

Author: buzz

Description:
I upgraded to 1.14rc and the filecache is now returning css with the wrong mime/type

Firefox says

Error: The stylesheet http://exotica.travelmate/mediawiki/index.php?title=MediaWiki:Common.css&usemsgcache=yes&ctype=text%2Fcss&smaxage=18000&action=raw&maxage=18000 was not loaded because its MIME type, "text/html", is not "text/css".
Source File: http://exotica.travelmate/wiki/Main_Page
Line: 0

this happens only with

$wgUseFileCache = true;

and when not logged in.


Version: 1.14.x
Severity: major

Details

Reference
bz17420

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:30 PM
bzimport set Reference to bz17420.
bzimport added a subscriber: Unknown Object (MLST).

buzz wrote:

Just some more info

headers without filecache

HTTP/1.1 200 OK
Date: Mon, 09 Feb 2009 09:09:54 GMT
Server: Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch
X-Powered-By: PHP/5.2.6-2ubuntu4
Cache-Control: public, s-maxage=18000, max-age=18000
Vary: Accept-Encoding
X-Vary-Options: Accept-Encoding;list-contains=gzip
Content-Length: 6362
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/css; charset=UTF-8

headers with filecache

HTTP/1.1 200 OK
Date: Mon, 09 Feb 2009 09:10:28 GMT
Server: Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch
X-Powered-By: PHP/5.2.6-2ubuntu4
Cache-Control: public, s-maxage=18000, max-age=18000
Content-language: en
Vary: Accept-Encoding
X-Vary-Options: Accept-Encoding;list-contains=gzip
Content-Length: 6362
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

buzz wrote:

Some more information: I was previously running 1.3.2. my core files are identical to mediawiki (checked with diff).

buzz wrote:

i meant 1.13.2 of course

Fixed in r47139 and backported. It will be in the next 1.14 release.