Closed Bug 1449185 Opened 6 years ago Closed 6 years ago

loops on opening pdf file

Categories

(Firefox :: File Handling, defect)

60 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 218257

People

(Reporter: xvalen214x, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180322152034

Steps to reproduce:

opening a preview of a pdf file in firefox, with the file:// protocol (even pdf hosted online has the same problem as ff would download them to a local temp file) (developer edition has the same problem)

(It may relate to default application/action by file type as it seems it is but the problem remains after I changed the default application)


Actual results:

each tab of the target url open a new tab with the same url, and thus keep looping itself (refer to the image attached) which is also very hard to terminate (as the window is keep gaining the input focus). Sometimes the application starts again after it is closed.


Expected results:

only one tab is opened while correctly showing the pdf content.
(In reply to Valen Cheung from comment #0)
> the problem remains after I changed the default application

1. Enter about:support into the location bar.
2. Click the Open Folder button. This opens a file manager window with your Firefox profile folder.
3. Exit Firefox.
4. Back in the file manager window, delete the handlers.json file.


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: 6 years ago
Component: Untriaged → File Handling
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: