Page MenuHomePhabricator

SVG from 2016 without XML prolog (<?xml ... ?>) served with MIME-Type text/plain instead of image/svg+xml
Open, LowPublic

Description

$ curl -I https://upload.wikimedia.org/wikipedia/commons/1/18/小行星數目.svg
HTTP/2 200 
date: Thu, 19 Jan 2023 19:42:36 GMT
content-type: text/plain
x-object-meta-sha1base36: iiiqmuhd0ldzgaqdh8hsvfn4glxv6fv
last-modified: Tue, 19 Jan 2016 17:07:09 GMT
server: ATS/9.1.3
etag: W/5a0faa8654fedee458143df5b7ff7caa
vary: Accept-Encoding
age: 1837
x-cache: cp1086 hit, cp1086 hit/2
x-cache-status: hit-front
server-timing: cache;desc="hit-front", host;desc="cp1086"
strict-transport-security: max-age=106384710; includeSubDomains; preload
report-to: { "group": "wm_nel", "max_age": 86400, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] }
nel: { "report_to": "wm_nel", "max_age": 86400, "failure_fraction": 0.05, "success_fraction": 0.0}
accept-ch: Sec-CH-UA-Arch,Sec-CH-UA-Bitness,Sec-CH-UA-Full-Version-List,Sec-CH-UA-Model,Sec-CH-UA-Platform-Version
permissions-policy: interest-cohort=(),ch-ua-arch=(self "intake-analytics.wikimedia.org"),ch-ua-bitness=(self "intake-analytics.wikimedia.org"),ch-ua-full-version-list=(self "intake-analytics.wikimedia.org"),ch-ua-model=(self "intake-analytics.wikimedia.org"),ch-ua-platform-version=(self "intake-analytics.wikimedia.org")
x-client-ip: 18.10.82.33
access-control-allow-origin: *
access-control-expose-headers: Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache
timing-allow-origin: *
accept-ranges: bytes
content-length: 14008

It should return content-type: image/svg+xml instead of content-type: text/plain

This issue is similar to T131012, but worse since text/plain (differently to text/html)

More details can be found at https://en.wikipedia.org/wiki/Special:Diff/1134646677/1134651417#text/plain_vs_image/svg+xml