Clicking on hyperlink with file shows it's contents instead of downloading




14 years ago
11 years ago


(Reporter: sdt78, Assigned: bugs)


Firefox Tracking Flags

(Not tracked)





14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

After I click on a hyperlink ( contents of
this file is shown instead of downloading it

Reproducible: Always
Steps to Reproduce:
2.Click on the hyperlinks in the bottom of the screen (any of 2)

Actual Results:  
Contents of RAR file is shown

Expected Results:  
Start download manager

IE works correctly in this situation

Comment 1

14 years ago
$ curl -I
HTTP/1.1 200 OK
Date: Sun, 24 Oct 2004 11:08:32 GMT
Server: Apache/2.0.52 (Win32)
Last-Modified: Tue, 03 Sep 2002 07:35:50 GMT
ETag: "483f-cc33-5e881c86"
Accept-Ranges: bytes
Content-Length: 52275
Content-Type: text/plain; charset=WINDOWS-1251

Mozilla and MIME Types Documentation:

According to that page, "When the Content-Type sent by the server is one of
(case-sensitively) text/plain, text/plain; charset=ISO-8859-1 or text/plain;
charset=iso-8859-1, and the server did not send a Content-Encoding header,
Mozilla will sniff the first block of data it gets and check for non-text bytes.
Text bytes are 9-13, 27, and 31-255. When encountering a non-text byte, the
helper app dialog will be shown, showing the mime-type corresponding to the
extension of the file."

Since the Content-Type here is text/plain; charset=WINDOWS-1251, Firefox is
doing the intended thing and displaying the page in-browser. This is a server
configuration issue. If you want it to work with Firefox, please have the server
send the correct MIME type for RAR files.
Last Resolved: 14 years ago
Resolution: --- → INVALID
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.