Closed
Bug 500742
Opened 17 years ago
Closed 17 years ago
.asc files are shown within the browser even though the prefs are set to save them
Categories
(Firefox :: File Handling, defect)
Tracking
()
VERIFIED
WONTFIX
People
(Reporter: aremo, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060214 Firefox/3.0.11
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060214 Firefox/3.0.11
In Firefox's preferences, "Applications" tab, I have an entry that says "ASC file Save File". Nevertheless, .asc files are shown in the browser when clicked.
Reproducible: Always
Steps to Reproduce:
1. set prefs to save .asc files
2. click on .asc file link
3.
Actual Results:
.asc file is shown in browser
Expected Results:
.asc file should've been saved
Comment 1•17 years ago
|
||
>2. click on .asc file link
is this a link to a local file, an ftp link or http/https ?
The extension doesn't matter for Http links, the content-type from the server does. Please provider a link to such an .asc file or watch the content type yourself with http://web-sniffer.net.
If the server sends the file as text(plain then Gecko will render this in the browser and you can't override internal supported mime-types
(In reply to comment #1)
> is this a link to a local file, an ftp link or http/https ?
> The extension doesn't matter for Http links, the content-type from the server
> does.
This is wrong. If there's a setting saying "ASC Files are to be downloaded", then ASC files are to be downloaded. Otherwise that option is just there to waste the user's time.
> Please provider a link to such an .asc file
There is one at the URL I provided, near the end of the page.
Comment 3•17 years ago
|
||
The asc file type you refer to is given a mime type of test plain. It is therefore treated as a text file.(In reply to comment #2)
> (In reply to comment #1)
> This is wrong. If there's a setting saying "ASC Files are to be downloaded",
> then ASC files are to be downloaded. Otherwise that option is just there to
> waste the user's time.
>
On the contrary, I'm afraid your expectations are wrong.
RFC2616 (Hypertext Transfer Protocol -- HTTP/1.1), Section 7.2.1 Type, states:
Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the resource.
In other words, how a file is processed by a browser is determined by the Content-Type field in the http Response Header; the file suffix should be ignored when there is a Content-Type field.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
(In reply to comment #3)
> > This is wrong. If there's a setting saying "ASC Files are to be downloaded",
> > then ASC files are to be downloaded. Otherwise that option is just there to
> > waste the user's time.
>
> On the contrary, I'm afraid your expectations are wrong.
My expectations are for the program to do what I tell it to do.
I really couldn't care less if some random server says otherwise.
If there's an option that says "ASC files are to be saved", I want ASC files to be saved, period. It's actually very simple. Or it should be.
Regarding the technical side of the matter, there's no official MIME type for ASC files that I know of. They can be anything. They could be "text/plain" or they could be "text/pgp-signature" or whatever. So there is really NO EXCUSE for Firefox to ignore the file extension, since an .asc file can in fact only be recognized as such by its extension.
Status: RESOLVED → VERIFIED
Resolution: INVALID → WONTFIX
Comment 5•17 years ago
|
||
HTTP Status Code: HTTP/1.1 200 OK
Date: Sat, 27 Jun 2009 15:31:30 GMT
Server: Apache/1.3.41 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8d PHP/5.2.9
Last-Modified: Fri, 12 Dec 2008 14:42:08 GMT
ETag: "666df-c5-49427840"
Accept-Ranges: bytes
Content-Length: 197
Connection: close
Content-Type: text/plain; charset=utf8
text/plain is supported by Gecko itself and that means that Gecko renders this text file.
>since an .asc file can in fact only be recognized as such by its extension.
Extensions doesn't matter for Http/1.1 URLs.
You need to log in
before you can comment on or make changes to this bug.
Description
•