Closed Bug 1560986 Opened 5 years ago Closed 5 years ago

After I asked firefox to open pdf's in firefox by default, everytime I open a pdf it asks me over and over how I want to open it, opening an unlimited amount of tabs

Categories

(Firefox :: File Handling, defect)

67 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 218257

People

(Reporter: dario, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

I first clicked on a link to an arbitrary pdf. as always firefox asked me how I wanted to open it. I selected "open with firefox" (or similar) and ticked the do not ask me again button. it opened correctly. then I closed firefox, reopened firefox and opened another pdf.

Actual results:

firefox opened a ton of tabs to files in the /tmp folder.
opening a pdf results in firefox creating a new tab, then asking how to open the pdf, automatically selecting the open in firefox option, and repeat.

Expected results:

It should have opened and displayed the PDF in a new tab.

If you get a "What should Firefox do with this file?" dialog and you choose to open with Firefox, that will create an infinite loop. That dialog is for external applications only, and you're not supposed to be able to pick Firefox there [1]. To do that safely, use the Open in Browser extension [2].

The only way to view PDFs in Firefox is to set the action to "Preview in Firefox" in about:preferences. However, servers can still trigger the "What should Firefox do with this file?" dialog, usually by sending the Content-Disposition: attachment header. One way to get around that is the Bypass Forced Download extension [3]. Less commonly, they can also fail to correctly identify the file type by sending Content-Type: application/octet-stream. Extensions like Header Editor can override that [4].

[1] Bug 218257
[2] https://addons.mozilla.org/firefox/addon/open-in-browser/
[3] https://addons.mozilla.org/firefox/addon/bypass-forced-download/
[4] https://addons.mozilla.org/firefox/addon/header-editor/

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Component: Untriaged → File Handling
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.