Subject: Re: correct mime type Date: 09 Mar 2001 13:41:25 GMT From: "William A. Rowe, Jr." <wrowe@lnd.spam.not.welcome.net> Organization: Concentric Internet Services Newsgroups: comp.infosystems.www.servers.ms-windows References: 1From: "Helmut Leitner" <leitner@hls.via.at> Sent: Friday, March 09, 2001 4:41 AM > I have problems with downloading binary tgz files from my website > (uses Apache) by using Netscape 4.x as client. > > Netscape shows these files as text (a mess), while I would like > to configure Apache/Netscape/Windows (whoever is responsible) to > show a "save as" Dialog.
First, you have not set the mime type correctly, which should be application/octet-stream if it is binary data you have no clue about. Second, there is _NO_ way to force a user to get a save-as dialog box, althought most browsers should present it for this media type.
> BTW IE works correctly, independent from what mime type I > configure.
IE NEVER works correctly with mime types. It goes to the trouble of filling the registry keys of the extentions with their mime types, yet never bothers testing them. It checks the filename extention. It's totally useless and non-compliant behavior. Try saving and serving an html file as foo.txt. You will get a text/plain file. So WTF does IE display? A friggin marked up web page, not text/plain, although you just TOLD it that it was plain and it MUST IGNORE all contents.
> The apache FAQ recommends to "configure the correct mime type". > But what is this for tgz?
It's a application/x-gzip encoded application/x-tar file. If you had named it .tar.gz, the default mime types would have handled it.
> Is there a complete list of recommended mime types?
http://www.iana.org/numbers.htm
See the apache/conf/mime.types file, and be familiar with the files you serve.
Bill
Obiger Link verweist auf
* RFC 2048 * directory ftp://ftp.isi.edu/in-notes/iana/assignments/transfer-encodings/ * RFC 1700 * RFC 2045