Closed Bug 1292599 Opened 8 years ago Closed 8 years ago

browser.helperApps.neverAsk.openFile not working

Categories

(Firefox :: Settings UI, defect, P3)

47 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 453455

People

(Reporter: cyprian.guerra, Unassigned)

References

Details

Attachments

(3 files)

Attached file mimeTypes.rdf
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build ID: 20151016093648

Steps to reproduce:

1. clicked on download option of text/csv file
2. selected "Open with" and path to /usr/bin/gedit
3. checked "[x] Do this automatically for files like this from now on."
4. clicked "OK"
5. closed opened file
6. clicked on download option of the same text/csv file again


Actual results:

Firefox didn't respect mimeTypes.rdf rules to open text/csv files with gedit without asking and displayed a dialog asking what to do instead. Only difference in behavior: the check-box from step #3 was checked this time.

Tested on Firefox:
Version: 47.0+build3-0ubuntu0.15.10.1
Version: 41.0.2+build2-0ubuntu1

Reproducible:
1. by just clicking in Firefox
2. by setting FirefoxProfile with Selenium web-driver
3. by modifying about:config in Firefox and mimeType.rdf directly


Expected results:

Firefox should respect mimeTypes.rdf rules and automatically open text/csv file with gedit without asking what to do.
Attached image modal.png
Adding a modal dialog screenshot.
The feature works as expected (i.e. modal dialog doesn't show up next time the file is downloaded) when option "Save File" is selected instead of "Open with".
Adding mimeTypes.rdf I manually created for testing (without clutter).
Similar to bug 1012615?
Component: Untriaged → Preferences
See Also: → 1012615
(In reply to Loic from comment #4)
> Similar to bug 1012615?

Seems similar but I don't think it has anything to do with special support of CA files. What's more, it works as expected when selecting "Save File" instead of "Open with" - which isn't the case with bug 1012615.
It also doesn't work for image/png mime types. Saving without prompt does, opening without prompt doesn't.
I believe this is a dupe of bug 453455? cyprian, are you able to see the headers of the response? Does it include content-disposition:attachment?
Flags: needinfo?(cyprian.guerra)
Priority: -- → P3
Sorry for delay.

(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #7)
> [...] headers of the response? Does it include content-disposition:attachment?

Yes... e.g.:

> Content-Disposition:"attachment; filename=foobar.csv"

Without this header the browser remembers the action and auto-opens the file. This is a duplicate. Is this a desired behavior, though? Auto-saving the file regardless of the "Content-Disposition" but auto-opening the file only when this header is absent?
Flags: needinfo?(cyprian.guerra)
Yeah this is a duplicate. If the user requests to auto open or to save these types of files automatically we should respect the users request over the websites request.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: