Page MenuHomePhabricator

MIME type for some css files set incorrectly from payments server
Closed, ResolvedPublic

Description

When loading the payment forms on payments.wikimedia.org I get several MIME type errors in Firefox. For example:

Error: The stylesheet https://payments.wikimedia.org/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".

Since the file name is in the query string instead of in the main part of the URL, Apache doesn't know to serve it as text/css instead of text/html. To work around this problem on the cluster we specify the type in the link tag:

<link rel="stylesheet" href="/w/index.php?title=MediaWiki:Common.css&amp;usemsgcache=yes&amp;ctype=text%2Fcss&amp;smaxage=2678400&amp;action=raw&amp;maxage=2678400" type="text/css" media="all" />

On payments, however, the type is not being specified:

<link rel="stylesheet" href="/index.php?title=MediaWiki:Common.css&amp;usemsgcache=yes&amp;ctype=text%2Fcss&amp;smaxage=18000&amp;action=raw&amp;maxage=18000" />

(This issue will be moot one the Recource Loader is deployed.)


Version: unspecified
Severity: minor

Details

Reference
bz25459

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:14 PM
bzimport set Reference to bz25459.

Fixed by whitelisting the pages so they can actually load.