PDA

View Full Version : problem with print Location on IIS !!!


jpveen
08-05-2005, 11:06 AM
I have a cgi/perl script that I moved from Unix (Apache) webhost to Windows (IIS6.0) webhost.

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: http://gkvlely.storagesupport.nl/Audio/archief2004/023-Dankdag-5nov04-Kinder_samenkomst.mp3
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: http://lelystad.gkv.nl/dienst/023-Dankdag-5nov04-Kinder_samenkomst.mp3
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

Jeff Mott
08-05-2005, 10:58 PM
I notice also that both point to different URLs. Do you know why? Is this from the same print location statement in both situations?

jpveen
08-08-2005, 09:32 PM
Yes, both point to different URL's, that's because I moved not only the script, but also the mp3-files.
The print Location: is the same in both scripts.

Jeff Mott
08-08-2005, 09:50 PM
The print Location: is the same in both scriptsBut they produce different URLs? When I had first tried each URL above one worked and the other didn't. Perhaps the problem is not with the server or the method of redirection, but with the address that is generated.

That's the best I can think of without seeing the code and a live example of the problem.