DNG files downloaded as TIFF

Both on discuss.pixls.us and on raw.pixls.us attempting to download a DNG file results in a file with a tif extension using Firefox (at least on Windows). Example response headers for GET https://raw.pixls.us/getfile.php/1022/nice/Adobe%20DNG%20Converter%20-%20Canon%20EOS%205D%20Mark%20III%20-%2016bit%20uncompressed%20(3:2).DNG:

HTTP/1.1 200 OK
Date: Fri, 13 Apr 2018 05:11:37 -0400
Server: Apache
X-Powered-By: PHP/7.4.21
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-Disposition: attachment; filename="Adobe DNG Converter - Canon EOS 5D Mark III - 16bit uncompressed (3:2).DNG"
Content-Length: 48382640
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: image/tiff

An example from discuss.pixls.us is Pentax K1-II, difference between Jpeg and DNG - #7 by Peter - https://raw.pixls.us/getfile.php/3345/nice/Pentax%20-%20K-1%20Mark%20II%20-%2014bit%20(3:2).DNG

Interestingly, some DNG files are not affected; for example, in the topic Revealing more refined details using RT, the file https://discuss.pixls.us/uploads/short-url/jW3sJuWd8LpRStYcxiSkGIAld1W.dng is downloaded with the dng extension. On raw.pixls.us, a DNG file with a lower-case .dng extension is also assigned the TIFF content type. GET https://raw.pixls.us/getfile.php/2835/nice/Apple%20-%20iPhone%208%20-%2016bit%20(4:3).dng also has response headers with that information.

Using Brave (a Chromium-based browser) on Windows saves those files with the original extension.

It was @Peter who brought this to my attention.

get the same in latest stable firefox on windows 10 and kubuntu
chrome worked fine

I get this too. I was assuming this must be some macOS issue.

this is just yet another raw.pixls.us link.

From what i have learned, DNG is technically speaking a TIFF file. So raw.pixls.us is actually not wrong in setting that content-type. S3 sets:

Content-Type: image/x-adobe-dng

On the other hand it is weird that firefox overrides the filename based on the content-type.

@andabata maybe raw.pixls.us should set application/octet-stream for all those image files?

2 Likes

On my Ubuntu 20.04 laptop tried downloading the abovementioned two files.

The Pentax K1-II file mentioned above (.DNG):
Firefox 91.0.02 downloads it as .tiff
Chromium 93.0.4577.63 downloads it as .DNG

The other (.dng) file mentioned above:
Firefox 91.0.02 downloads it as .dng
Chromium 93.0.4577.63 downloads it as .dng

Both files show file type/MIME type = image/tiff which seems correct.

So Firefox appears to be changing the file extension from .DNG to .tiff, but doesn’t do that for .dng files

What about setting Content-Type: image/x-adobe-dng, like S3 used by the forum does, or simply application/octet-stream ?
What do we gain by setting image/tiff ?