Re: MIME types
Andy Norris ([email protected])
Mon, 01 May 1995 17:39:57 -0400
At 10:10 PM 5/1/95, Number 6 wrote:
>
>On Mon, 1 May 1995, Chris Marrin wrote:
>
>> Because the mime decoding takes place at the server. This server is
>> telling us the mime type is text/plain or text/html or something and we
>> are dutifully sending that document to the external viewer which handles
>> that type. The right solution is really to get the mime.types fixed on
>> the server...
>
>I still don't geddit. When I transfer a file by binary mode FTP, as far
>as I am aware that file gets dumped wholesale, as-is, into a directory of
>my choice. However, if the file extension is recognised by Netscape (as
>.wrl for example), then it downloads the file and THEN spawns the
>appropriate viewer. I don't have that much experience of sgis, but I
>believe this to be the case with Windows Netscape. Please correct me if
>I'm wrong.
It's not Netscape doing the recognizing. If it's being transferred by HTTP
(as opposed to FTP), the first thing the server sends is a MIME header
setting the file type. That way if you have a CGI script such as
http://www.foo.com/cgi-bin/form-processor.pl
Netscape will recognize it fine, as long as the script sends the proper
header.
The reason the file extension is important is that unless there is a
program generating the output (which generates it's own header), the
server uses the file extension to determine what header to send.
If you tell your Web server that any file with the extension .gif is
an audio file (.au), it will send all gifs to your specified .au
player. (If you try this, let me know what it sounds like. <bg.)
If I haven't explained something well enough, let me know.
--Andy
[email protected]