Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 295759 - Firefox asks to save file to disk even if mime-type is text/plain
: Firefox asks to save file to disk even if mime-type is text/plain
Product: Firefox
Classification: Client Software
Component: File Handling (show other bugs)
: unspecified
: All All
: -- normal with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: William Hsu [:whsu]
Depends on:
  Show dependency treegraph
Reported: 2005-05-27 16:02 PDT by Jonas Häggqvist
Modified: 2005-11-22 14:53 PST (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description Jonas Häggqvist 2005-05-27 16:02:20 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Opening the url pops up Firefox'
download-dialog even though the webserving is specifying the mimetype
text/plain. The file includes 6 non-printable characters, but I don't believe
this warrants ignoring the mimetype specified by the server.

Reproducible: Always

Steps to Reproduce:
1. Open url
2. That's it
3. There is no 3.
Actual Results:  
Firefox opens its "Save or open with" dialog.

Expected Results:  
Display the file-contents as text/plain as the server specified.
Comment 1 OstGote! 2005-05-27 16:59:18 PDT
Same for Moz 1.7.8. I guess this is because the txt file contains some special
characters (non-printable) and the parser decides not to display it (thinks this
is some of the binary file types which are sent wrongly with plain/text).
Comment 2 Matthias Versen [:Matti] 2005-05-27 22:32:17 PDT
Mozilla auto-sniffing decided that this can't be text. You can see that at the
text of the save as dialog in recent Mozilla trunk builds.

I think this is an edge case and will probably not fixed but confirming because
the developers must decide what to do with this bug report...
Comment 3 Aaron Slunt 2005-05-27 22:36:03 PDT

GET /irc/rockbox-20050527.txt HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2)
Gecko/20050523 Firefox/1.0+
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
Range: bytes=45260-
If-Range: "1eb186-125d2-a559d580"

HTTP/1.x 206 Partial Content
Date: Sat, 28 May 2005 05:35:05 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-12
Last-Modified: Fri, 27 May 2005 21:59:02 GMT
Etag: "1eb186-125d2-a559d580"
Accept-Ranges: bytes
Content-Length: 29958
Content-Range: bytes 45260-75217/75218
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: text/plain; charset=iso-8859-1

Could firefox be leaving it up to the user what to do since it believes that the
page is possibly corrupted (partial content)?
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2005-05-29 09:15:58 PDT
> Server: Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-12

This is a known-buggy server that sends "text/plain; charset=iso-8859-1" for any
content it doesn't recognize.  We've been forced to work around such servers
after asking them for years to fix the bug.  See and for the discussion on
the Apache bugs.

Note, further, that sending the document in question as text/plain is in fact a
violation of the RFC that defines the text/plain MIME type, since the file
_does_ include said unprintable characters (which text/plain files are not
allowed to do).

Note You need to log in before you can comment on or make changes to this bug.