Open
Bug 638300
Opened 13 years ago
Updated 2 years ago
inconsistent behavior for PDF files served as application/force-download
Categories
(Firefox :: File Handling, defect)
Firefox
File Handling
Tracking
()
NEW
People
(Reporter: vincent-moz, Unassigned)
References
()
Details
Attachments
(1 file)
9.32 KB,
image/png
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-GB; rv:1.9.2.14) Gecko/20110218 Firefox/3.6.14 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-GB; rv:1.9.2.14) Gecko/20110218 Firefox/3.6.14 For a PDF document served as application/force-download, Firefox recognizes the file as PDF, but doesn't suggest to open the document with the default PDF viewer as it does for files served as application/pdf. Reproducible: Always Steps to Reproduce: 1. Open http://www.sytral.fr/fileadmin/application/download_plan.php?uid=20 Actual Results: A dialog appears saying: You have chosen to open C1C2.pdf which is a: Portable Document Format from: http://www.sytral.fr What should Firefox do with this file? * Open with [Choose...] [...] Expected Results: Since Firefox recognizes the file as Portable Document Format, it should propose the default application for PDF files. But one may wonder whether to recognize the file as PDF is OK. Information should come from the Content-Type header. Similar problem under Linux. Also note that the user cannot be aware of the difference between application/pdf and application/force-download, since such information isn't shown. In both cases, Firefox just says "Portable Document Format". So, the user should expect the same behavior. For this file, the HTTP response is: HTTP/1.1 200 OK Date: Thu, 03 Mar 2011 00:47:54 GMT Server: Apache/1.3.34 (Unix) mod_gzip/1.3.19.1a PHP/4.4.2 mod_ssl/2.8.25 OpenSSL /0.9.6m X-Powered-By: PHP/4.4.2 Content-Disposition: attachment; filename=C1C2.pdf Content-Transfer-Encoding: binary Content-Length: 811499 Pragma: no-cache Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: application/force-download
Comment 1•13 years ago
|
||
> Since Firefox recognizes the file as Portable Document Format
The UI chooses to pick that string based on the extension. The core code, which is what decides how to handle the data, relies entirely on the MIME type, very much on purpose.
Oer to Firefox for the confusing UI bit.
Product: Core → Firefox
QA Contact: file-handling → file.handling
Reporter | ||
Comment 2•12 years ago
|
||
The bug still occurs with: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20100101 Firefox/10.0.4 Iceweasel/10.0.4 The URL given in the bug report no longer works, but the following one triggers the bug: http://www.annecy.org/resources/download.php?id=6589
Comment 3•11 years ago
|
||
Reproducible with the latest Nightly (build ID: 20130813155809) on a Windows 7 64bit machine, with the URL from comment 2.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•9 years ago
|
||
This bug is still present in Firefox 42 running on Windows 7 x64 machine. Returned MIME type when upload a PDF file is 'application/force-download'. I tested with Chrome and everything works OK. Please, fix it. Thanks!
Comment 5•8 years ago
|
||
This bug is still present in Firefox 44 running on Windows 7 x64 machine. Please, fix it. Thanks!
Comment 6•8 years ago
|
||
It appears to me, that it is now impossible to open local PDF files with Firefox in Windows 10, after installing "Cumulative update for Windows 10: September 13, 2016". Any local PDF, being dropped to the Firefox window, causes "Save as" dialogue. Even when Firefox is set as default app for PDF files in Windows settings. And there is no option to open preview. Maybe this update makes all local PDF files to have MIME type of "application/force-download" or something. PDF files from the internet, which have a type of "application/pdf" , are opened in the Firefox internal PDF viewer, as always.
Comment 7•8 years ago
|
||
It turned out, that the behavior mentioned above probably was not caused by Cumulative update. For unknown reason, new code appeared mimeTypes.rdf. I never edited the file nor installed any PDF software recently. The following code in the mimeTypes.rdf made Firefox unable to preview PDFs: <RDF:Description RDF:about="urn:mimetype:application/force-download" NC:fileExtensions="pdf" NC:description="" NC:value="application/force-download" NC:editable="true"> <NC:handlerProp RDF:resource="urn:mimetype:handler:application/force-download"/> </RDF:Description> Probably, it somehow was added automatically after downloading PDF from some website (as mentioned in https://support.mozilla.org/en-US/kb/applications-panel-set-how-firefox-handles-files )
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•