Page MenuHomePhabricator

Bad content type for SVG source
Closed, DeclinedPublic

Description

when trying to download the source of an svg, the server returns
"application/octetstream" as the mime type (which causes my FF to want to open
it as OGG, for whatever reason). This needs to be changed to "image/svg+xml" in
the apache configuration.


Version: unspecified
Severity: normal
URL: http://upload.wikimedia.org/wikipedia/commons/4/4a/Commons-logo.svg

Details

Reference
bz3425

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 8:48 PM
bzimport set Reference to bz3425.
bzimport added a subscriber: Unknown Object (MLST).

jeluf wrote:

Added svg to mime.types file on albert.

wiki.pedia.WiseFool wrote:

The MIME type right now is "image/svg", which will work for most viewers, but
it's not correct. It should be "image/svg+xml"

Looks right to me...

Content-Type: image/svg+xml

wiki.pedia.WiseFool wrote:

You already replied that you'd fix it back in Wikipedia's Village Pump, but for
the sake of the bug: it's apparently just a display problem on the Image: pages,
which say "MIME type: image/svg".

To clarify:

The mime type used internally by MediaWiki for SVG is image/svg - that's how it
is recorded in the database, and thus shown on the description page. This is
actually my fault, I did that wrong when I wrote the MimeMagic stuff.

Note that the MIME type in the HTTP header is unrelated to the one used by
MediaWiki, because image files are not served through MediaWiki, but directly by
the webserver.

MediaWiki could be made to use the correct mime type internally by changing the
code in the five or so places where "image/svg" is hard-coded, and then updating
the entries in the database. I'm not sure if that is worth the effort, though.

I would prefer it to be consistent with the correct type, if possible...
However this should be moved to a new bug, because this bug referred
to an actual, unrelated, server misconfiguration some months back.

zigger wrote:

*** Bug 2419 has been marked as a duplicate of this bug. ***