Closed Bug 276099 Opened 20 years ago Closed 20 years ago

File extentions overwrite mime settings

Categories

(Firefox :: File Handling, defect)

1.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jacobs.robin, Assigned: bugs)

Details

As I can't reopen bug# 234083 I reopen a new bug form instead. FF (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0) does not handle mime types correctly, file extentsions seem to overrule the mime type is some cases. test results from http://entropymine.com/jason/testbed/mime/ Mime: Result text/html : OK (opens in browser) image/gif : OK (opens in browser) image/png : OK (opens in browser) text/plain [A] & [B] : OK (opens in browser) application/octet-stream [A],[B],[C] & [D] & x-foo/x-bar: NOT OK it correctly pops up where I want to download the file or view it but it defaults to "open in firefoxhtml") application/zip : OK (downloads the file) In my own test it shows that when downloading a file with extention .avi it always pops up the option view or save with the default set to view. (including when MIME is set to "application/zip") (if I change the extention to .foo it handles it correctly) IMMO FF should honnor the MIME above file extention, so AT LEAST set the default action to SAVE when mime is set to application/octet-stream no matter what the file extention is.
Works for me in the latest trunk : Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20041225 Firefox/1.0+ at first it didn't work for application/octet-stream with the *.zip extension (it opened Stuffit without prompting), but that was because I've added that filetype in the Options. Removing all file-mappings restored the expected behavioru. Reporter, could it be that this was the case for you ?
I remove AVI from the filetype options and problem still exists. (and even if this would have fixed the problem it still would be a bug in FF, it should listen to the MIME, a file extention does not tell much about the actual contents of the file and should only be considered when the MIME type is unknown)
WFM 20041227 PC/Win2000 Unless you can reproduce this in a trunk build with a clean profile, this bug should be resolved. All current development is on the trunk, and everyone who looks at this with current trunk builds cannot reproduce a problem.
I downloaded the latest FF (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041226 Firefox/1.0+) and installed it on a fresh system. and it produces the same results on the http://entropymine.com/jason/testbed/mime/ pages
Our behavior with the application/octet-stream cases is not a bug: if you tell Firefox to go ahead and open [B] or [C] you'll see that the contents say "Your browser should ask you to save this file to disk, or possibly allow you to select a helper application to use to view it." That's exactly what we do: allow you to select the helper application which would be launched if you saved it, which in the .html case would be Firefox. A file extension doesn't say much about the contents of a file *on the web*, but once we've accepted that application/octet-stream means it's going to your filesystem, it says everything. If the OS knows what it would use when you save and then open the file with the filename the server is suggesting, then we default to saving you the trouble of saving it, finding it, and double-clicking it. Since your OS doesn't know what it would do with movie.foo, we default to save instead of open in that case, but since virtually nobody is going to save movie.avi sent as application/octet-stream as movie.suspect, then open it in a hex editor to determine whether or not it's actually an AVI, we offer to let you do what we know is going to happen anyway.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Still it should select save to disk, as instructed by the webserver, as the DEFAULT option when the mime type is set to application/octet-stream. (I don't mind it gives the open in .... option as long as the defaults ok) The current behaviour would be ok for other Mime-typed (like video/x-msvideo) but currently there is no way to get the save to disk as default option as even with an unknown mime-type it sugests to open it in media player. I want to program in a standard compliant way in in this odd case its FF that breaks the rules (even IE does it right this time)
You need to log in before you can comment on or make changes to this bug.