Closed Bug 1623555 Opened 4 years ago Closed 4 years ago

General Preference > Applications option "Do this Automatically for files like this from now on" not respected

Categories

(Firefox :: File Handling, defect)

73 Branch
All
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 453455

People

(Reporter: smayer97, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

Set Application preference for WAV file to use QuickTime and selected "Do this Automatically for files like this from now on".

Actual results:

When opening WAV file, e.g. via email (Yahoo), Firefox DOES open the file with QuickTime BUT selecting the "Do this Automatically for files like this from now on" choice is not respected...the dialogue box keeps coming up.

(this has been going on for several versions)

Expected results:

Selection this option should remember the choice and automatically open the file with the selected application.

I confirm this issue on Mac OS 10.12 and all the latest versions of the 4 main channels.

Status: UNCONFIRMED → NEW
Component: Untriaged → File Handling
Ever confirmed: true
OS: Unspecified → macOS
Hardware: Unspecified → All

What are the values of the Content-Disposition and Content-Type response headers from the server?

If it sends Content-Disposition: attachment, this isn't OS-specific and it's a duplicate of bug 453455.

If it sends Content-Type: application/octet-stream, things may have changed recently, but historically this hasn't been treated as a specific file type.


Any of the sample files on the following page should open directly if you previously checked "Do this automatically…":

BTW, I just tried the sample WAV files from the link above and sure enough they do open automatically. So not sure what is different from Yahoo Mail as per my example.

Could you answer the questions from comment #2, please?

Flags: needinfo?(smayer97)
Flags: needinfo?(daniel.bodea)

Glad to help but I am unfamiliar with the environment. I looked around the Web Console and do not know how to get the info you request. Please advise.

Flags: needinfo?(smayer97)

(In reply to smayer97 from comment #5)

Glad to help but I am unfamiliar with the environment. I looked around the Web Console and do not know how to get the info you request. Please advise.

Before you open the file, if you open the web console, then click "Network" at the top of the web console, then click the file in question that causes the prompt, in theory a new entry appears in the list of requests. if you select that by clicking on it (you may need to accept the download for it to show up / provide all the information), then on the right hand side, toggle "raw headers", then right click on those headers, pick "Select all", and then right click again and "copy", and then paste in here, and then simply edit the text to leave the lines that contain "content-disposition" and "content-type", if any. :-)

Flags: needinfo?(smayer97)

I gave that a try but note that as soon as I click on the Download button about 20 entries are created and no others are created when I click to open the file with QuickTime in the FF dialogue box.

Nevertheless, i tried to narrow down the most likely candidates based on Type. I found 2 entries = x-waveform_alaw from Host: apis.mail.yahoo.com and Host: dl-mail.ymail.com. Not sure if this what you need. All I found was this:
x-content-type-options: nosniff

No entries for
Content-Disposition: attachment
Content-Disposition: attachment

Flags: needinfo?(smayer97)

(In reply to :Gijs (he/him) from comment #4)

Could you answer the questions from comment #2, please?

I'm not technical enough to answer that.
Please give more specific instructions and I'll do my best to help.
Thank you.

Flags: needinfo?(daniel.bodea)
  1. Open the network monitor.
  2. Set the filter to All and maybe type wav into the Filter URLs search box.
  3. Click the trash can icon on the left to clear the output.
  4. Open a WAV file from Yahoo Mail.
  5. Once the download has finished, on the left side of the network monitor, select the file in question.
  6. On the right side, in the Response Headers category, note the values of the Content-Disposition and Content-Type headers. You could also enable Raw Headers in that section and just copy and paste the whole output in a comment here.
Flags: needinfo?(daniel.bodea)

There were 3 wav related events in the Network Monitor that were displayed when the pop-up to download/open with pop-up.
The Raw response headers are:
1.
HTTP/2 307 Temporary Redirect
location: https://apis.mail.yahoo.com/ws/v3/mailboxes/@.id==VjN-4v3feRs4fgNI4A47fnc8XCvtBKWuYKU6Tsh5NDkLZzHS0vTARaDcIdVKVUkZQTOypXSQPIt7834jXjyRXCwNNg/messages/@.id==ADF_2WNg-LbZXoxNHAajOBZaPrg/content/parts/@.id==2/refresh?appid=YMailNorrin&ymreqid=7cf037ce-9679-f149-1ccf-670004010900&error=https%3A%2F%2Fmail.yahoo.com%2Fd%2Fiframemsg%3Fid%3Ddownload-7775877355
x-server-response-time: 60ms
x-server-chain: jws700036.mail.ir2.yahoo.com
x-server-timestamp: Fri, 24 Apr 2020 10:42:06 GMT
content-length: 0
referrer-policy: no-referrer-when-downgrade
date: Fri, 24 Apr 2020 10:42:06 GMT
age: 0
strict-transport-security: max-age=15552000
server: ATS
expect-ct: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
X-Firefox-Spdy: h2

HTTP/2 307 Temporary Redirect
location: https://dl-mail.ymail.com/ws/download/mailboxes/@.id==VjN-4v3feRs4fgNI4A47fnc8XCvtBKWuYKU6Tsh5NDkLZzHS0vTARaDcIdVKVUkZQTOypXSQPIt7834jXjyRXCwNNg/messages/@.id==ADF_2WNg-LbZXoxNHAajOBZaPrg/content/parts/@.id==2/raw?appid=YMailNorrin&ymreqid=7cf037ce-9679-f149-1ccf-670004010900&token=EwqffTnxS0e_CeDWgd5gwsZPk5GYoaeKMxmfKTNgFnkC6O74DVTmDoOxQqQQ3EGjXDsDQBwV_aRDpzKt_sdL1jLAMtL5LcUk9iO8zJnphez45m1mvDatQsFdD6xwgldl&error=https%3A%2F%2Fmail.yahoo.com%2Fd%2Fiframemsg%3Fid%3Ddownload-7775877355
x-server-response-time: 182ms
x-proxy-server-response-time: 35ms
x-server-chain: jws200037.mail.ne1.yahoo.com,jws700014.mail.ir2.yahoo.com
x-server-timestamp: Fri, 24 Apr 2020 10:42:06 GMT
content-length: 0
referrer-policy: no-referrer-when-downgrade
date: Fri, 24 Apr 2020 10:42:06 GMT
age: 0
strict-transport-security: max-age=15552000
server: ATS
x-frame-options: SAMEORIGIN
expect-ct: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
set-cookie: A1=d=AQABBGC8ol4CEPx_VKQwKtAny1D0ihVkhJMFEgEAAQIGpF5vX9yDziMA_SMAAAcIVbyiXuAwqRcID8uxVbs8dn3A2O8-iml_ygkBBwoBHA&S=AQAAArnPsif9B57GsW3Ysx6D78Q; Max-Age=31557600; Domain=.yahoo.com; Path=/; SameSite=Lax; Secure; HttpOnly
set-cookie: A3=d=AQABBGC8ol4CEPx_VKQwKtAny1D0ihVkhJMFEgEAAQIGpF5vX9yDziMA_SMAAAcIVbyiXuAwqRcID8uxVbs8dn3A2O8-iml_ygkBBwoBHA&S=AQAAArnPsif9B57GsW3Ysx6D78Q; Max-Age=31557600; Domain=.yahoo.com; Path=/; SameSite=None; Secure; HttpOnly
set-cookie: A1S=d=AQABBGC8ol4CEPx_VKQwKtAny1D0ihVkhJMFEgEAAQIGpF5vX9yDziMA_SMAAAcIVbyiXuAwqRcID8uxVbs8dn3A2O8-iml_ygkBBwoBHA&S=AQAAArnPsif9B57GsW3Ysx6D78Q&j=GDPR; Domain=.yahoo.com; Path=/; SameSite=Lax; Secure
set-cookie: B=1fa9gs1fa5f2l&b=4&d=h7XqrCttYFoZS1jhk.r5&s=fq&i=y7FVuzx2fcDY7z6KaX_K; Max-Age=31557600; Domain=.yahoo.com; Path=/
set-cookie: GUC=AQEAAQJepAZfb0IdZAQ9; Max-Age=31557600; Domain=.yahoo.com; Path=/; Secure
X-Firefox-Spdy: h2

HTTP/2 200 OK
content-type: audio/wav
content-disposition: attachment; filename="file_example_WAV_1MG.wav"; filename*=UTF-8''file_example_WAV_1MG.wav
scan-status: CLEAN
pragma: no-cache
expires: 0
cache-control: private, max-age=120, must-revalidate
x-server-response-time: 2012ms
x-server-chain: jws700039.mail.ir2.yahoo.com
x-server-timestamp: Fri, 24 Apr 2020 10:42:09 GMT
content-length: 1073218
referrer-policy: no-referrer-when-downgrade
date: Fri, 24 Apr 2020 10:42:09 GMT
age: 4
strict-transport-security: max-age=15552000
server: ATS
expect-ct: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
X-Firefox-Spdy: h2

Feel free to NI me if you need more information.

Flags: needinfo?(daniel.bodea)

Thanks, that was really helpful! The salient part is:

(In reply to Bodea Daniel [:danibodea] from comment #10)

content-disposition: attachment; filename="file_example_WAV_1MG.wav"; filename*=UTF-8''file_example_WAV_1MG.wav

We always prompt if the server sends content-disposition: attachment, because in some cases (clearly not here, but in some cases...) the server will not send the file again, and so opening it in an app while it's saved in the temp folder, and then deleting the file when the app closes, leads to dataloss. This is probably less of a concern on macOS, which is covered in the bug.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE

That may be the case in Bodea Daniel's case but not in mine! So is my case truly a duplicate of the 12 year old enhancement thread you linked this to?

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to smayer97 from comment #12)

That may be the case in Bodea Daniel's case but not in mine!

Sorry, but I think you must've misread the web console output for Yahoo Mail, given that you can open WAV files without a prompt from other sites (comment 3).

So is my case truly a duplicate of the 12 year old enhancement

That's what I suspected back at comment 2. Install an add-on like Bypass Forced Download to work around the issue (alternatives include InlineDisposition Reloaded, Rewrite Content Disposition, and InlineDispositionv2). If any of those makes the problem go away on Yahoo Mail, then that leaves no doubt.

No, I did not misread the web console but as I pointed out, it is possible I did not select the correct entries simply because there are little dozens generated just from clicking to download the WAV attachment. I have tried multiple times. BTW, if I filter for wav, I get nothing. Tried filtering on Media and get 3 entries. Here is the output again of 3 entries:

Persist Logs
Disable cache
3 requests
716.38 kB / 3.56 kB transferred
Finish: 42.69 s
Request URL:https://dl-mail.ymail.com/ws/download/mailboxes/@.id==VjN-Wq2Ig_IA2KOePUiNyZLQpfVHdAeq90bl0ttsWTMT5Yzdy9Rxnjk20XAQcs66wmuDBmBxuc2UTjmHlmQVvjcwMQ/messages/@.id==ADsCmetLrsgHXopxqwqewHRXYWQ/content/parts/@.id==2/raw?appid=YMailNorrin&ymreqid=d67fabc2-c858-5498-1ca0-f705a6011e00&token=zitEzqOML3j84e6ealFTT5U7-km5qEQF52lp7AcCuBa_a2fNnn_waP7gVaWVkDL3aIT-Kz4kCtIOBnl6sRt2IcSYKEEH4o9KOSgrfDp2y1gaXYsR4RvwvgV3QYEmzl84&error=https%3A%2F%2Fmail.yahoo.com%2Fd%2Fiframemsg%3Fid%3Ddownload-8015271715
Request method:GET
Remote address:66.218.84.41:443
Status code:
307
Version:HTTP/2
Referrer Policy:origin

Response headers (889 B)
Raw headers
HTTP/2 307 Temporary Redirect
location: https://apis.mail.yahoo.com/ws/v3/mailboxes/@.id==VjN-Wq2Ig_IA2KOePUiNyZLQpfVHdAeq90bl0ttsWTMT5Yzdy9Rxnjk20XAQcs66wmuDBmBxuc2UTjmHlmQVvjcwMQ/messages/@.id==ADsCmetLrsgHXopxqwqewHRXYWQ/content/parts/@.id==2/refresh?appid=YMailNorrin&ymreqid=d67fabc2-c858-5498-1ca0-f705a6011e00&error=https%3A%2F%2Fmail.yahoo.com%2Fd%2Fiframemsg%3Fid%3Ddownload-8015271715
x-server-response-time: 24ms
x-server-chain: jws400176.mail.bf2.yahoo.com
x-server-timestamp: Fri, 24 Apr 2020 19:00:33 GMT
content-length: 0
referrer-policy: no-referrer-when-downgrade
date: Fri, 24 Apr 2020 19:00:33 GMT
age: 0
strict-transport-security: max-age=15552000
server: ATS
expect-ct: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
X-Firefox-Spdy: h2
Request headers (863 B)
Raw headers
Accept
text/html,application/xhtml+xm…ml;q=0.9,image/webp,/;q=0.8
Accept-Encoding
gzip, deflate, br
Accept-Language
en-CA,en-US;q=0.7,en;q=0.3
Connection
keep-alive
DNT
1
Host
dl-mail.ymail.com
Referer
https://mail.yahoo.com/
TE
Trailers
Upgrade-Insecure-Requests
1
User-Agent
Mozilla/5.0 (Macintosh; Intel …) Gecko/20100101 Firefox/75.0


Persist Logs
Disable cache
3 requests
716.38 kB / 3.56 kB transferred
Finish: 42.69 s
Request URL:https://dl-mail.ymail.com/ws/download/mailboxes/@.id==VjN-Wq2Ig_IA2KOePUiNyZLQpfVHdAeq90bl0ttsWTMT5Yzdy9Rxnjk20XAQcs66wmuDBmBxuc2UTjmHlmQVvjcwMQ/messages/@.id==ADsCmetLrsgHXopxqwqewHRXYWQ/content/parts/@.id==2/raw?appid=YMailNorrin&ymreqid=d67fabc2-c858-5498-1ca0-f705a6011e00&token=zitEzqOML3j84e6ealFTT5U7-km5qEQF52lp7AcCuBa_a2fNnn_waP7gVaWVkDL3aIT-Kz4kCtIOBnl6sRt2IcSYKEEH4o9KOSgrfDp2y1gaXYsR4RvwvgV3QYEmzl84&error=https%3A%2F%2Fmail.yahoo.com%2Fd%2Fiframemsg%3Fid%3Ddownload-8015271715
Request method:GET
Remote address:66.218.84.41:443
Status code:
307
Version:HTTP/2
Referrer Policy:origin

Response headers (889 B)
Raw headers
HTTP/2 307 Temporary Redirect
location: https://apis.mail.yahoo.com/ws/v3/mailboxes/@.id==VjN-Wq2Ig_IA2KOePUiNyZLQpfVHdAeq90bl0ttsWTMT5Yzdy9Rxnjk20XAQcs66wmuDBmBxuc2UTjmHlmQVvjcwMQ/messages/@.id==ADsCmetLrsgHXopxqwqewHRXYWQ/content/parts/@.id==2/refresh?appid=YMailNorrin&ymreqid=d67fabc2-c858-5498-1ca0-f705a6011e00&error=https%3A%2F%2Fmail.yahoo.com%2Fd%2Fiframemsg%3Fid%3Ddownload-8015271715
x-server-response-time: 24ms
x-server-chain: jws400176.mail.bf2.yahoo.com
x-server-timestamp: Fri, 24 Apr 2020 19:00:33 GMT
content-length: 0
referrer-policy: no-referrer-when-downgrade
date: Fri, 24 Apr 2020 19:00:33 GMT
age: 0
strict-transport-security: max-age=15552000
server: ATS
expect-ct: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
X-Firefox-Spdy: h2
Request headers (863 B)
Raw headers
Accept
text/html,application/xhtml+xm…ml;q=0.9,image/webp,/;q=0.8
Accept-Encoding
gzip, deflate, br
Accept-Language
en-CA,en-US;q=0.7,en;q=0.3
Connection
keep-alive
DNT
1
Host
dl-mail.ymail.com
Referer
https://mail.yahoo.com/
TE
Trailers
Upgrade-Insecure-Requests
1
User-Agent
Mozilla/5.0 (Macintosh; Intel …) Gecko/20100101 Firefox/75.0


HTTP/2 200 OK
content-type: audio/x-waveformat_alaw
content-disposition: attachment; filename="Sunday_04-05-2020_08'02'43_PM.wav"; filename*=UTF-8''Sunday_04-05-2020_08%2702%2743_PM.wav
scan-status: CLEAN
pragma: no-cache
expires: 0
cache-control: private, max-age=120, must-revalidate
x-server-response-time: 810ms
x-server-chain: jws400028.mail.bf2.yahoo.com
x-server-timestamp: Fri, 24 Apr 2020 19:00:35 GMT
content-length: 244524
referrer-policy: no-referrer-when-downgrade
date: Fri, 24 Apr 2020 19:00:35 GMT
age: 1
strict-transport-security: max-age=15552000
server: ATS
expect-ct: max-age=31536000, report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only"
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
X-Firefox-Spdy: h2


As you can see, there are NO entries as originally requested for Content-Disposition: nor Content-Type:.

Let me know if this helps or if you would like something else.

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to smayer97 from comment #14)

As you can see, there are NO entries as originally requested for Content-Disposition: nor Content-Type:.

Yes there is:

(snip first 2 requests)

content-type: audio/x-waveformat_alaw
content-disposition: attachment; filename="Sunday_04-05-2020_08'02'43_PM.wav"; filename*=UTF-8''Sunday_04-05-2020_08%2702%2743_PM.wav

So yes, this is the same issue. The server sends content-disposition: attachment, so we ask to avoid dataloss.

Sorry...not sure why my search did not pick up on that. Thx for pointing it out.

So for clarity, what is the solution? Is this something that needs to be fixed in FF?

(In reply to smayer97 from comment #16)

Sorry...not sure why my search did not pick up on that. Thx for pointing it out.

So for clarity, what is the solution? Is this something that needs to be fixed in FF?

You can use an add-on as gingerbreadman suggested. Or you can set these files to automatically save to disk (which we'll honour even when the server sends content-disposition: attachment, because there can be no dataloss) and then open them from the downloads panel / about:downloads / the library window (Tools > Downloads or the corresponding shortcut). Or you can wait for a fix on that bug.

(In reply to :Gijs (he/him) from comment #17)

(In reply to smayer97 from comment #16)

Sorry...not sure why my search did not pick up on that. Thx for pointing it out.

So for clarity, what is the solution? Is this something that needs to be fixed in FF?

You can use an add-on as gingerbreadman suggested. Or you can set these files to automatically save to disk (which we'll honour even when the server sends content-disposition: attachment, because there can be no dataloss) and then open them from the downloads panel / about:downloads / the library window (Tools > Downloads or the corresponding shortcut). Or you can wait for a fix on that bug.

Well, based on that fact that this was merged with a thread that is 12 years old, and that thread is marked as an enhancement and not a bug, and it is marked as priority P5, what are the chances this will actually ever get fixed?

And Chrome can handle this without an issue, why can't FF?

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