Saving a JPEG image incorrectly uses WebP file extension
Categories
(Core :: Networking: HTTP, defect)
Tracking
()
People
(Reporter: yoasif, Unassigned)
References
(Regression)
Details
(Keywords: regression)
Looks kinda like Bug 1526731.
As seen on https://www.reddit.com/r/firefox/comments/er3i7y/saving_jpeg_files_now_saves_as_webp_files_since/
Steps to reproduce:
- Navigate to https://vignette.wikia.nocookie.net/cardfight/images/9/9b/BT08-074EN-C.jpg
- Right click on the playing card image and choose "Save Image As..."
- Click save in the dialog that appears.
What happens:
The file is saved with filename "BT08-074EN-C.webp". Running "identify" (imagemagick) on the file reveals that the file is a JPEG:
BT08-074EN-C.webp JPEG 545x800 545x800+0+0 8-bit sRGB 239496B 0.000u 0:00.000
Expected result:
The file is saved as: "BT08-074EN-C.jpg" since it is a JPEG image. Chrome does this correctly.
Saving the file in Chrome vs. Firefox and running md5sum reveals that they are the same file.
Additional note -- I was initially unable to reproduce this issue because I wasn't opening the image in a tab -- I was just context clicking the link and saving as -- and in that save dialog, Firefox correctly uses a jpg extension. It is only after opening the image that Firefox saves with the incorrect extension.
29:19.22 INFO: Last good revision: 26d95900951d4b7b4875456ba0990176956fc02e
29:19.22 INFO: First bad revision: 0614c786ca70ef998274b1bcebbcd612a5d5d00a
29:19.22 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=26d95900951d4b7b4875456ba0990176956fc02e&tochange=0614c786ca70ef998274b1bcebbcd612a5d5d00a
Reporter | ||
Comment 1•5 years ago
|
||
[Tracking Requested - why for this release]: User visible regression, posted about on social media.
Comment 2•5 years ago
|
||
The server seams to be saying it is a WEBP image.
Request header:
GET /cardfight/images/9/9b/BT08-074EN-C.jpg HTTP/1.1
Host: vignette.wikia.nocookie.net
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: https://vignette.wikia.nocookie.net/
DNT: 1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
If-None-Match: CM6cx8K2z+UCEAE=
Cache-Control: max-age=0
Response Header:
HTTP/2 304 Not Modified
access-control-allow-origin: *
cache-control: public, max-age=31536000
content-disposition: inline; filename="BT08-074EN-C.webp"; filename*=UTF-8''BT08-074EN-C.webp
content-type: image/webp
date: Sun, 19 Jan 2020 22:19:02 GMT
etag: CM6cx8K2z+UCEAE=
surrogate-key: f9080cada5be0abc0068a5c81a7f45f488ef5d0b wiki-cardfight thumblr original
x-thumbnailer: Thumblr
timing-allow-origin: *
x-cacheable: YES - FORCED
age: 0
vary: Accept
x-cache: ORIGIN, HIT, MISS
x-served-by: thumblr-f85b76f47-vc94t, wk-cdn-f4, wk-cdn-f5
x-cache-hits: ORIGIN, 23, 0
X-Firefox-Spdy: h2
Reporter | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Can you compare with the request/response headers as seen on Chrome?
Comment 4•5 years ago
|
||
Chromium-
Request Header:
:authority: vignette.wikia.nocookie.net
:method: GET
:path: /cardfight/images/9/9b/BT08-074EN-C.jpg
:scheme: https
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
accept-encoding: gzip, deflate, br
accept-language: en-GB,en-US;q=0.9,en;q=0.8
cache-control: max-age=0
if-none-match: CM6cx8K2z+UCEAE=
sec-fetch-dest: document
sec-fetch-mode: navigate
sec-fetch-site: none
sec-fetch-user: ?1
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4035.0 Safari/537.36
Response Header:
accept-ranges: bytes
access-control-allow-origin: *
age: 0
cache-control: public, max-age=31536000
content-disposition: inline; filename="BT08-074EN-C.webp"; filename*=UTF-8''BT08-074EN-C.webp
content-length: 221726
content-type: image/webp
date: Sun, 19 Jan 2020 22:19:02 GMT
etag: CM6cx8K2z+UCEAE=
status: 304
surrogate-key: f9080cada5be0abc0068a5c81a7f45f488ef5d0b wiki-cardfight thumblr original
timing-allow-origin: *
vary: Accept
x-cache: ORIGIN, HIT, MISS
x-cache-hits: ORIGIN, 45, 0
x-cacheable: YES - FORCED
x-served-by: thumblr-f85b76f47-vc94t, wk-cdn-f4, wk-cdn-f2
x-thumbnailer: Thumblr
Comment 5•5 years ago
|
||
Sounds like the server is sending bad information? Not sure how we can fix this without re-breaking bug 1544231. I'd take a low-risk fix for 73 still, but we're getting pretty late in the cycle for that.
Comment 6•5 years ago
|
||
Gijs should we flag as dupe of Bug 1526731?
Comment 7•5 years ago
|
||
Yes, after bug 1526731 we actually save a webp image instead of .jpg when following the steps in comment #0.
Updated•5 years ago
|
Description
•