Page MenuHomePhabricator

Incorrect Content-Type for image thumbnails: "application/x-www-form-urlencoded mime-type"
Closed, DuplicatePublic

Description

Sometimes, MediaWiki returns image previews with incorrect type.
Which produces glitches in my browser.
Examples:
good, Content-Type: image/jpeg:
https://upload.wikimedia.org/wikipedia/mediawiki/thumb/a/a9/Example.jpg/150px-Example.jpg
bad, Content-Type: application/x-www-form-urlencoded:
https://upload.wikimedia.org/wikipedia/mediawiki/thumb/a/a9/Example.jpg/100px-Example.jpg

GET /wikipedia/mediawiki/thumb/a/a9/Example.jpg/150px-Example.jpg HTTP/1.1
User-Agent: Wget/1.17.1 (mingw32)
Accept: */*
Accept-Encoding: identity
Host: upload.wikimedia.org
Connection: Keep-Alive
HTTP/1.1 200 OK
Date: Fri, 26 Jul 2019 09:56:25 GMT
Content-Type: image/jpeg
Content-Length: 10554
Connection: keep-alive
Last-Modified: Mon, 07 Aug 2017 21:22:10 GMT
Etag: bc694ccbc51a528a26fb50f8eb2b60ee
X-Timestamp: 1502140929.59573
X-Trans-Id: tx7599aaa05b014341a1fa0-005d39cc7a
Server: ATS/8.0.3
X-Varnish: 361581552 267890435
Age: 65999
X-Cache: cp3034 hit, cp3044 hit/4
X-Cache-Status: hit-front
Server-Timing: cache;desc="hit-front"
Strict-Transport-Security: max-age=106384710; includeSubDomains; preload
X-Analytics: https=1;nocookies=1
X-Client-IP: [redacted]
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish
Timing-Allow-Origin: *
Accept-Ranges: bytes
GET /wikipedia/mediawiki/thumb/a/a9/Example.jpg/100px-Example.jpg HTTP/1.1
User-Agent: Wget/1.17.1 (mingw32)
Accept: */*
Accept-Encoding: identity
Host: upload.wikimedia.org
Connection: Keep-Alive
HTTP/1.1 200 OK
Date: Fri, 26 Jul 2019 09:56:40 GMT
Content-Type: application/x-www-form-urlencoded
Content-Length: 5402
Connection: keep-alive
X-Object-Meta-Sha1Base36: ryzocj56h59mjkpvq86wte30li3wycn
Last-Modified: Mon, 14 Aug 2017 07:22:00 GMT
Etag: e7cc88dc6a343d0b8435630156c2bc29
X-Timestamp: 1502695319.14630
X-Trans-Id: txaef0d4823d6541d79f205-005d3a03b9
Server: ATS/8.0.3
X-Varnish: 370481128 365988032
Age: 51871
X-Cache: cp3046 hit, cp3044 hit/2
X-Cache-Status: hit-front
Server-Timing: cache;desc="hit-front"
Strict-Transport-Security: max-age=106384710; includeSubDomains; preload
X-Analytics: https=1;nocookies=1
X-Client-IP: [redacted]
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish
Timing-Allow-Origin: *
Accept-Ranges: bytes