Closed Bug 541945 Opened 14 years ago Closed 13 years ago

Firefox does not honor "Always do this" for pdf-files

Categories

(Firefox :: File Handling, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 453455

People

(Reporter: rune, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; da; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; da; rv:1.9.2) Gecko/20100115 Firefox/3.6

Some pdf files (like downloads in gmail) won't open in the PDF plugin, suppose it has to do with the mime-type.

These files can be downloaded an viewed in Preview.

I get the download dialog, but Firefox does not open the file automatically. I have to click "OK". Preview has been chosen and the "Remember this" (Using danish so don't know the English wording is marked. 

Reproducible: Always

Steps to Reproduce:
1. Click a link to pdf from eg a Gmail message
2. Se the download dialog
3. 
Actual Results:  
1. 

Expected Results:  
1. Click the pdf
2. Automatically opened pdf in preview

Maybe this has to do with the mime type, but if the mime type is not supposed to be opened or remembered, the checkbox should not be there and an explanation should be available.
This is either caused by application/octet-stream as mimetype. In that case the "do this automatically for files like this from now on" checkbox is greyed out.
The other case is a content-disposition:attachment header which always forces a download dialog. The "do this automatically for files like this from now on" is there and you can check it (but will not be used with such a header). 

Which case do you mean ?
After upgrading to FF4.0 the firefox-mac-pdf plugin doesn't work anymore (for the time).
"Normal links" to pdf files now open i Preview as they should (the first described mimetype), but Gmail attachments still open as described in #1 (the second escribed mimetype). The check mark for Remember this is ticked.

I find the behavior inconsistent from a user perspective. In both cases there are 
1) a link to a pdf
2) a dialog box exactly the same
3) Different behavior bases on invisible to the user mimetypes.

I'd like Firefox just to treat all pdf files equal or at least tell me that the webpage has asked that the file is downloaded in a clearly manner, maybe a text next to the checkmark.
This is linked with bug 300169 and bug 491869. The behavior that websites (Gmail in the current case) intended is to *force* you to download the file, instead of e.g. previewing it in Firefox. This can be a silly idea, but that's not Firefox's business.

The Firefox bug is that it detects the file is a PDF even if Gmail didn't want it to, and instead of downloading it automatically, asks what to do with it. But OTOH it doesn't allow you to remember your selection, because it knows it shouldn't. This is plain wrong and inconsistent.

(This is still present with FF7.)
>The Firefox bug is that it detects the file is a PDF
Firefox doesn't detect anything, it will use the content-type sent by the server.

>and instead of downloading it automatically, asks what to do with it
Gmail sends a content-disposition:attachment header and the http RFC requires that the Client (Firefox) should always ask the user what to do with the file.

>it doesn't allow you to remember your selection, because it knows it shouldn't.
Firefox allows you to remember the decision for the given content type and that is stored. This stored selection is however not used if there is an content-disposition:attachment header or if a plugin that handles this content-type.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
(In reply to Matthias Versen (Matti - away until 11/18) from comment #4)
> Firefox doesn't detect anything, it will use the content-type sent by the
> server.
I think I mixed several issues, this looks very complex to me. Bug 300169 and bug 491869 report that PDF files served as application/octet-stream are presented by Firefox as "PDF document", but the suggested handler application is the default text editor. This is easy to check (on Linux at least) with that file:
http://www.persee.fr/articleAsPDF/estat_0336-1454_2006_num_393_1_7148/article_estat_0336-1454_2006_num_393_1_7148.pdf

But that's probably a slightly different bug, better comment on bug 300169.
That is a complete different bug. The "do this automatically" checkbox is disabled for the "general binary data" content type application/octet-stream and nothing can be saved.
You need to log in before you can comment on or make changes to this bug.