Open Bug 1753090 Opened 2 years ago Updated 1 year ago

"Save as" on an mp3 link with redirection suggests unexpected name with *.mpga

Categories

(Core :: Audio/Video, defect, P3)

Unspecified
Linux
defect

Tracking

()

Tracking Status
firefox98 --- affected

People

(Reporter: ori, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Using latest Firefox Nightly on Linux.

Given this <a> element HTML:

data:text/html,<a href="https://www.buzzsprout.com/1004689/9960311-microsoft-wants-to-dominate-the-games-industry-w-rob-zacny.mp3">link to mp3</a>

Right clicking the element and choosing "Save link as" suggests saving it as this filename:

"ctfhm6l9wdjls1k3q4ypu5sdeqdi.mpga"

For comparison, the latest version of Chrome (97) suggests this filename:

"ctfhm6l9wdjls1k3q4ypu5sdeqdi.mp3"

But an older version (91) suggested

"9960311-microsoft-wants-to-dominate-the-games-industry-w-rob-zacny.mp3"

which makes more sense (Curiously, this better filename was only suggested when "Saving As..." an <audio> element, and not an <a> element).

When the URL doesn't end with an extension, and the mime type is "audio/mpeg", the suggested extension should be ".mp3" instead of the esoteric ".mpga".

And is there a reason why the suggested filename isn't based on the URL, like "9960311-microsoft-wants-to-dominate-the-games-industry-w-rob-zacny.mp3" ?

For further reference, the URL from above redirects to:

https://audio.buzzsprout.com/ctfhm6l9wdjls1k3q4ypu5sdeqdi?response-content-disposition=inline&

Which serves the file with these headers:

content-type: audio/mpeg
content-disposition: inline

Note the lack of "filename" in the content-disposition, so there's nothing that forces Firefox to suggest any particular filename.

I expect this is another regression of bug 1704115. Over to the audio/video team for triage.

Component: File Handling → Audio/Video
Product: Firefox → Core
See Also: → 1749294
Severity: -- → S3
Flags: needinfo?(padenot)
Priority: -- → P3

Reproduced on latest Nightly 98.0a1 2022-02-07 under Ubuntu 21.04 Wayland.
This issue reproduces back to Nightly 83.0a1 2020-10-14, so it's not a recent regression.

The .mp3 file downloaded using the builds before October 2020, has no extension.
This is the pushlog between no extension and .mpga extension: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d95aab08e480fc45205453c02d9941b7b9cc80e9&tochange=3a9fcbf00f37714e083b447a059ad543e50eee71

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Linux

https://connect.mozilla.org/t5/discussions/audio-mpeg-saves-it-as-mpga-instead-of-mp3/td-p/9606

I thought the websites I used to visit had changed the file extension and then I realized it was Firefox.
Using Firefox 102.0.1 (64-bit) Linux Mint

Example:
https://cope-cdnmed.agilecontent.com/resources/mp3/9/9/1657390038099.mp3?download

I have to change the extension to mp3 to play it in my HW player.

Blocks: 1778322

Issue reproduces on Ubuntu20.4 using Beta 103.0b8 (20220712185923) and Nightly 104.0a1(20220712215641).

(In reply to Monica Chiorean from comment #4)

Issue reproduces on Ubuntu20.4 using Beta 103.0b8 (20220712185923) and Nightly 104.0a1(20220712215641).

It looks like Windows has hidden the extension from you, in my case there doesn't seem to be a problem there.

This is annoying as hell and I'd suggest this be bumped up to a higher priority.

Bug existant in 103.0 and Ubuntu 20.04.4 LTS

Also on 103.0.1 (64-bit) Linux Mint 20.3

See Also: → 1782366, 1772988

It seems that Firefox looks in Linux in this file for mime-type when there is no extension defined and we only rely on "content-type: audio/mpeg".

~ $ grep mp3 /etc/mime.types
audio/mpeg mpga mpega mp2 mp3 m4a

By modifying this line and starting with mp3, Firefox suggests mp3

You need to log in before you can comment on or make changes to this bug.