My script does a redirect (print Location: $location) of a choosen MP3 file. Website visitors must be able to do a right mouse click on the link to the CGI/perl script and choose the "Save target as" to save the MP3 file instead of listening to it.
And now comes the problem: with the Windows-IIS webhost the visitors get the script-name as a filename when choosing "Save target as" instead of the MP3 filename! (In Apache the same action resulted in the MP3 filename.)
When I analyse the headers the webserver produces there is a big difference. Apache produces a "302 Found" with a location, and this works ok, but IIS produces a "200 OK" and this is apperently interpreted different by the browser!
Can anyone help? Thanks very much!
Header produced by Win/IIS server:
HTTP/1.1 200 OK
Connection: close
Date: Fri, 05 Aug 2005 08:45:43 GMT
Content-Length: 9351474
Content-Type: audio/mpeg
Content-Location: [sub.example1.nl...]
Last-Modified: Fri, 05 Aug 2005 00:00:50 GMT
Accept-Ranges: bytes
ETag: "63c556bd5099c51:580a4"
Server: Microsoft-IIS/6.0
Header produced by Unix/Apache server:
HTTP/1.1 302 Found
Date: Fri, 05 Aug 2005 08:43:02 GMT
Server: Apache/2.0.53 (Unix) mod_ssl/2.0.53 OpenSSL/0.9.7e
Location: [sub.example2.nl...]
Content-Length: 255
Connection: close
Content-Type: text/html; charset=iso-8859-1
The script is the same, it's called gkvl_o_a.html and includes the line print "Location: $SRC\n\n"
Thanks to anybody who can help me out!
Jan-Pieter
[edited by: jatar_k at 8:13 pm (utc) on Aug. 8, 2005]
[edit reason] generalized [/edit]