[geeky] odd Firefox/Safari bug
Aug. 20th, 2005 12:34 pmAt work our end users can download their voicemail from our web site. We use CGI scripts to authenticate them and send them the voicemail message. One user reported last week that he was unable to get either Firefox (Mac) or Safari to play his voicemail.
It appears, from the testing I have done with Firefox on Linux, that if the message type isn't natively supported in the browser -- i.e. the browser has to spawn an external application -- then Firefox essentially ignores the MIME type in the HTTP headers and tries to figure out what to do with the file based on the filename extension in the URL.
Observe:
http://www.unchi.org/~twp/sendjpg.cgi
This is a shell script that prints "Content-Type: image/jpeg" and then displays an image of yours truly. When I go to this URL I get a picture of my shining face.
However:
http://www.unchi.org/~twp/sendwav.cgi
This is a shell script that prints "Content-Type: audio/x-wav" and then sends a .WAV file of Morgan (age 2.5) saying "apple." When I visit this URL, Firefox announces that I am trying to download a file called "sendwav.cgi", which is of type "CGI script," and asks me what application I want to use to open it. No hint that it's an audio file.
Very odd. I can't find any reference to this quickly by Googling. Anyone else ever seen it before? IE appears to do the right thing, ironically enough.
It appears, from the testing I have done with Firefox on Linux, that if the message type isn't natively supported in the browser -- i.e. the browser has to spawn an external application -- then Firefox essentially ignores the MIME type in the HTTP headers and tries to figure out what to do with the file based on the filename extension in the URL.
Observe:
http://www.unchi.org/~twp/sendjpg.cgi
This is a shell script that prints "Content-Type: image/jpeg" and then displays an image of yours truly. When I go to this URL I get a picture of my shining face.
However:
http://www.unchi.org/~twp/sendwav.cgi
This is a shell script that prints "Content-Type: audio/x-wav" and then sends a .WAV file of Morgan (age 2.5) saying "apple." When I visit this URL, Firefox announces that I am trying to download a file called "sendwav.cgi", which is of type "CGI script," and asks me what application I want to use to open it. No hint that it's an audio file.
Very odd. I can't find any reference to this quickly by Googling. Anyone else ever seen it before? IE appears to do the right thing, ironically enough.