Closed Bug 328237 Opened 19 years ago Closed 19 years ago

download preferences does NOT display saved file action

Categories

(Toolkit :: Downloads API, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mozilla, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1 For some reason I was prompted to save a php file from a certain location. Firefox wanted to open it using KWrite, so I changed it to Kate (a text editor), and clicked the checkbox "do this by default from now on." When I clicked OK, it said "this can be changed via preferences/downloads". However, when I go to preferences/downloads, I *do not* see it listed in the list of actions. When I grep for Kate under my .mozilla folder, I do see it listed in the mimetypes.rdf folder. Reproducible: Always Steps to Reproduce: 1. Click on something that needs a download 2. Assign a default action 3. Look for it in the actions list
Does this happen with all files you download, or just that one? Could you tell us the mimetype of that file (as sent by the server)?
Ah, you're right - this *doesn't* happen with all file types (I just tried w/ ppt, and sure enough it turns up in the actions list.) Furthermore, I'm not prompted to choose an action for all of the php links on the page; here are some: <li><a href='http://url.com/wp-admin/edit-pages.php'>Pages</a></li> <li><a href='http://url.com/wp-admin/categories.php'>Categories</a></li> <li><a href='http://url.com/wp-admin/edit-comments.php'>Comments</a></li> <li><a href='http://url.com/wp-admin/moderation.php'>Awaiting Moderation (165)</a></li> Only the latter causes the dialog to popup, which means it must be a funky mimetype, right? The dialog box says it is "a PHP script"; do you need more information than that? If so, how do I find it? (BTW, at home -- vs at work, which is where I'm filing the bug--, stupidly, I chose "firefox" as being the default action for this file; doing that results in tabs opening in an infinite loop. I had to manually edit the mimetypes.rdf to fix the problem, since, again, it wasn't showing in the actions list.)
The links you've provided don't seem to point to a relevant page. Are you sure they demonstrate your problem? If Firefox is downloading PHP files, then there's a server misconfiguration somewhere, but that's completely unrelated and nothing to do with this report, or bug. > The dialog box says it is "a PHP script"; do you need more information than > that? If so, how do I find it? To find out the MIME type of the files, please use the Live Headers extension (http://livehttpheaders.mozdev.org/), and post the results up here.
Nice extension. OK, to address you questions in order: > The links you've provided don't seem to point to a relevant page. Are you sure they demonstrate your problem? Right, I changed the domain in the html fragment I pasted. Giving you the real links would not help anyway, since they're behind an authorization step. My point was that there's nothing different in the html between working php links and php links which cause the server to send a file (again, note what I said above - only one of these links is causing this). That's not the point anyway -- the point is the type not being saved in the actions list... > To find out the MIME type of the files, please use the Live Headers extension Here are all of the headers that are generated prior to firefox popping up the save file dialog: http://url.com/wp-admin/moderation.php GET /wp-admin/moderation.php HTTP/1.1 Host: url.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://url.com/wp-admin/edit.php Cookie: wordpressuser_xxx; wordpresspass_xxx HTTP/1.x 200 OK No content type, no mime type, etc. What causes firefox to pop up the save/open dialog? By way of comparison, here's the headers from a php file that it recognizes and handles appropriately: http://flavor8.com/wp-admin/categories.php GET /wp-admin/categories.php HTTP/1.1 Host: url.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://url.com/wp-admin/edit.php Cookie: wordpressuser_xxx wordpresspass_xxx HTTP/1.x 200 OK Date: Thu, 23 Feb 2006 23:21:27 GMT Server: Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a X-Powered-By: PHP/4.3.11 Expires: Wed, 11 Jan 1984 05:00:00 GMT Last-Modified: Thu, 23 Feb 2006 23:21:27 GMT Cache-Control: no-cache, must-revalidate, max-age=0 Pragma: no-cache Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8
OK. I know the problem now. Firefox is popping up a download dialog because it hasn't been sent a content-type by the server (a misconfiguration about which you might want to alert the server admins). Since it hasn't received *any* content-type, it has to sniff out the content type, and because of security reasons, Firefox will not save your actions for files with sniffed content-types.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.