Page MenuHomePhabricator

Font list resource doesn't have a "Content-type: text/plain;charset=utf-8" header
Closed, ResolvedPublic


Hi !

I just noticed the list of fonts supported by SVG to raster conversion tools (which @Dereckson linked to me) did not send an appropriate Content-type header.

With Firefox policy of always trying to not have invalid chars, thus defaulting to an ISO-8859-* font, this ends up showing "weird chars" in the font list (namely, ISO-8859 codepoints corresponding to the individual bytes of the - assumed - UTF-8 plain text data).

While it is not crucial, I hate to see a misencoding somewhere ;-)

Event Timeline

Apache configuration explicitely sets AddDefaultCharset:

<Directory /srv/mediawiki/docroot/noc/conf>
    AddDefaultCharset utf-8

According Apache configuration, "This directive specifies a default value for the media type charset parameter to be added to a response if and only if the response's content-type is either text/plain or text/html."

But headers ­doesn't show a Content-Type, at least when served by Varnish.

elukey subscribed.

The conf file does not have an extension and I think that Apache does not have any instruction about the MIME type to use.

Interesting link:

Not sure what is the best solution though..

Change 318074 had a related patch set uploaded (by Elukey):
Force Content-type for files without extensions (noc.w.o)

Change 318074 merged by Elukey:
Force Content-type for files without extensions (noc.w.o)

elukey claimed this task.

Just deployed, now looks good :)