Closed Bug 321744 Opened 19 years ago Closed 19 years ago

opening file doesn't automatically perform action when the 'Do this automatically...' checkbox has been marked and the content-type is incorrectly sent as text/plain by the server

Categories

(Firefox :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: alonsoalonsocr, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Firefox/1.5 when downloading a file of certain type, a dialog is opened asking to save or run the file with a selected application. My selected application appears, the Open with radio box is selected, and the 'Do this automatically from now on...' checkbox is also selected. Then why is it asking again? It keeps on asking for all kinds of files. Automatic actions seem to be broken. This started when I upgraded to 1.5. This happens in both my linux and windows98 boxes. Reproducible: Always Steps to Reproduce:
Alonso, there is very little information in this bug to allow anyone to diagonose the issue. Do you have an example link that illustrates the problem? dupe of bug 236541?
Whiteboard: DUPEME
What do you mean very little information? This is an obvious bug and he explained it quite well, all you have to do is try and download any file and check the 'Do this automatically from now on...' checkbox. Then the next time you try and download the same filetype it will still ask you what to do. Firefox does not automatically do anything anymore with any type of file. This happens with all filetypes on every platform I have tried (Win 2000, XP, Linux). This feature has never worked for me on any version of Firefox on any platform I use. I know it is not me because it happens on every single PC at the local university also.
Here is a sample url: https://mapsecure.net/discover-costa-rica.com/ffbug/2188/file.sxw Firefox 1.5 will ask everytime, while Firefox 1.07 will do the default action. I do not think this is the same as bug 236541 because that one is about a specific header Content-Disposition, which is not found in this request. Here we only have these: Content-Length: 12316 Content-Type: text/plain You will note something interesting about this url. The url is converted internally to locate the file by using the file id 2188 and not the file name, which in the example is file.sxw. Because the server does not use the file name to locate the file that it returns to the browser, it is possible to use any file name, for example: https://mapsecure.net/discover-costa-rica.com/ffbug/2188/file.pdf will return the same file, and then firefox will think it is a PDF and will still ask what to do. With that said, I am starting to think that the problem is caused by the Content-type header. Because if I download the file in a regular way (with no url conversion) then the Apache server will return the right content-type: Content-Length: 12316 Content-Type: application/vnd.sun.xml.writer so this is the same file that Firefox is getting and it is the same file name, the only difference is in the content-type, when it gets text/plain it will not do the default action even though it apparently "detects" the file type just by looking at its file extension (because if it was detecting the file type from the header then why does it offer to open the file in OpenOffice when it is named .sxw and in xpdf when it is named .pdf if the header is text-plain all along?). There might be some confusion for this bug and bug 236541, for some reason that other one was made specifically about the Content-Disposition header but I think some users might be experiencing this bug instead. The regular user, who has no access to the headers, wouldn't know the difference between these 2 bugs.
The other sample url that I mentioned (regular url with no conversion) is: http://mapsecure.net/x.sxw . Firefox 1.5 will automatically open this one in OpenOffice, apparently because it has the right Content-type. Eric please let us know what you get with these urls.
*** This bug has been marked as a duplicate of 315536 *** *** This bug has been marked as a duplicate of 315536 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
I am sorry but I do not see what my problem has to do with bug 315536. That one seems to be about not showing the dialog when Firefox will not allow the user to run the file. My problem is about not running the file when I have marked the box indicating that it should be run.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Summary: opening a file does not automatically perform selected action when the 'Do this automatically...' checkbox has been marked → opening file doesn't automatically perform action when the 'Do this automatically...' checkbox has been marked and the content-type is incorrectly sent as text/plain by the server
I can confirm this bug for Firefox 1.5 running on Windows.
(In reply to comment #0) > Then why is it asking again? It keeps on asking for all kinds of files. Regarding the URL mentioned in comment #3: It is asking because the Content-Type sent by the server was wrong: When the server sends a type of "text/plain" and Firefox determines that the content is actually binary data, it will "guess" a content type based on the file name. In this case, the option to automatically open/save files of this type is intentionally ignored (for security reasons I think, this was discussed in bug 285517). The download dialog just doesn't tell you that, and the checkbox there should be disabled in this case. Changing the UI to reflect the reason that the dialog was shown is handled in bug 285976, which makes this issue a dup of that bug. (In reply to comment #3) > There might be some confusion for this bug and bug 236541, for some reason > that other one was made specifically about the Content-Disposition header > but I think some users might be experiencing this bug instead. The regular > user, who has no access to the headers, wouldn't know the difference > between these 2 bugs. That's one more reason to fix bug 285976. We always show the download dialog for "Content-Disposition: attachment" as well, and again fail to tell this to the user. Do you see this on other URLs that are not convered by bug 285976? If not, I will mark this as a duplicate of bug 285976.
Hi Elmar, none of the actions you suggest really fix my problem. I appreciate the insight you provide into the complexity of this issue. Here is what I a was looking for when I filed this bug: I wanted to be able to tell firefox to always open a particular type of file in a given program. I really do not care how firefox determines the type, I think it is already clever enough in looking for the content-type and then perhaps sniffing the content or just looking at the file name is fine with me. Once it knows what the file is it should just go ahead and do what I have requested it should do. I don't agree that firefox should intentionally ignore my preference, at least not on security grounds, I don't know what other reasons there could be to do that. So marking my bug as a duplicate of another that is looking to do that is not a solution for my problem. If the developers are sure that they want firefox to work that way then simply my bug has no solution and should be deleted but never marked as a duplicate of that one. This bug has already been marked as duplicate of other bug that do not fix my problem, I don't want that to happen again. I'm sure this is not the place to continue commenting about why I don't want to be asked again but anyway, even if firefox told me that it has only guessed the file type from the name and not from the content-type, how would that change things? If firefox forced me to save the file, I would simply go to the file manager and double click it, then my file manager would again guess the file type probably again simply looking at the name and open the file in the program I wanted. It only makes it more difficult for me. If Firefox gives me the option of directly running the file then I would just run it right there, what else would I do? I have to open the file somehow, even if I was suspect of the contents I would still open it in my preferred program just to see what it is. So what's the issue with having Firefox do it for me without asking?
(In reply to comment #9) > I have to open the file somehow, even if I was suspect of the > contents I would still open it in my preferred program just to see what it is. > So what's the issue with having Firefox do it for me without asking? > I don't know the actual reasoning behind the design choice (I'm only a bug triager), but I would guess that it would be because malicious sites could send files with the wrong file extension in the hopes of managing to execute code in faulty applications in which the file is automatically opened.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → WONTFIX
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.