Firefox changes file extension of files when downloading them (mpg->mpeg, ts->tts)
Categories
(Firefox :: File Handling, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | wontfix |
firefox109 | --- | wontfix |
firefox110 | --- | wontfix |
firefox111 | --- | fix-optional |
firefox112 | --- | affected |
People
(Reporter: necvicencio, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
(Keywords: webcompat:platform-bug)
Attachments
(1 file)
27.12 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0
Steps to reproduce:
Start a download from a file sharing site. For example, download one of the files in this folder: https://www.mediafire.com/folder/qdtcajn6ag94x/StepPrime_-_BGA_Generic
Actual results:
The resulting file contains a different file extension (.mpeg)
Expected results:
The resulting file should contain its actual file extension (.mpg)
Reporter | ||
Comment 1•2 years ago
|
||
Additionally, this also happens with other file extensions. A similar issue I've encountered is when downloading certain .ts files from Google Drive, they end up with a ".tts" file extension
Comment 2•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::File Handling' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•2 years ago
|
||
I can confirm this report using the steps in comment 0. The test link is a valid test case.
Furthermore, this issue appears specific to Windows as it occurs in Windows 10, but not in Ubuntu22/MacOS11.
Comment 4•2 years ago
|
||
:alwu : Could we add mpg
to the list of valid extensions for the relevant filetypes here, a la bug 1772988? What mimetype would we have to use for that for it to work for this case?
(In reply to necvicencio from comment #1)
Additionally, this also happens with other file extensions. A similar issue I've encountered is when downloading certain .ts files from Google Drive, they end up with a ".tts" file extension
Can you file a separate bug blocking bug 1778322, and provide a test link where this problem reproduces? The fix will have to be different from the one for the mpeg
/mpg
confusion.
Comment 5•2 years ago
|
||
Sorry for my late reply, mpg is a format similar with mpeg
but specifically for the files using MPEG-1 and MPEG-2 compression. For their mime types, here what I found for Mpeg-1 and Mpeg-2, but I am not sure if we should support all of them. Maybe we can start by supporting video/mpg
?
But our media sniffer doesn't have an ability to detect mpg file, I wonder if we should detect it by checking the byte structure and then return a corresponding mimetype (eg. video/mpg
) and then let the external file helper to find a mapping? (video/mpg
-> mpg
)
Paul, I'm not sure if my analysis is correct or not, could you provide some thought here as well? Thank you.
Comment 6•2 years ago
|
||
The link has expired. We don't play mpg files and we don't have a sniffer for them. I don't know why we're changing the extension, since it should fail sniffing? It doesn't change the extension here on Linux desktop.
Comment 7•2 years ago
|
||
The Windows Registry reports the .mpeg
extension for video/mpeg
, video/mpg
, video/x-mpeg
I assume the file is served as one of those and we pick the extension from the Registry.
For video/vnd.dlna.mpeg-tts
it returns .tts
, while .ts
is some kind of text/plain
... So, in this case I suspect it may be a server misconfiguration serving .ts as a media type?
Comment 8•2 years ago
|
||
Unfortunately without a testcase (the original one expired) we cannot verify the headers and mimetypes sent by the server. If you could provide an updated example testcase, we could then verify that.
In the meanwhile I'm resolving this as incomplete, but you can reopen it at any time once you find a new testcase. Sorry about the delay that caused this problem.
Updated•9 months ago
|
Description
•