Expand Cut Tags

No cut tags

Aug. 20th, 2005

topaz: (befuddled)
At 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.

May 2018

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930 31  

Most Popular Tags

Style Credit

Page generated Jul. 4th, 2025 05:37 am
Powered by Dreamwidth Studios