> -----Original Message-----
> From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 30, 2002 1:13 PM
> To: [EMAIL PROTECTED]
> Subject: HTTP headers
> 
> 
> Hi all,
> 
> I want to print a zip file to the browser but I want to make 
> the browser
> think that it gets the zip file directly, not through a CGI script.
> 
> Why?
> Because when clicking on a link for downloading a zip file 
> directly, the
> download managers are triggered, and the page visitors can 
> download the zip
> file using a download manager.
> 
> If I print the zip file to the browser, it opens the default Internet
> Explorer window for downloading the file and the download 
> managers are not
> triggered at all.
> 
> I've tried to find what headers appear when opening a zip 
> file in Internet
> Explorer directly.
> 
> I found:
> Accept-Ranges: bytes
> Content-Length: [the number of bytes]
> Connection: close
> Content-type: application/zip
> 
> If I use these headers, the zip file still opens the default 
> download window
> of Internet Explorer.
> 
> I've tried adding the following header line, with the same results:
> Content-disposition: attachment; filename=filename.zip
> 
> Please tell me which header should I print to make Internet 
> Explorer, and
> the download managers think that it is a real zip file, and 
> not one served
> by a CGI script.
> 
> Thank you very much!

I think the problem is that IE "helps" you by examining the
trailing portion of the URL to determine the file type.

Try adding ?.zip to your download URL. Instead of

   //myserver/cgi-bin/download.cgi

Use this instead:

   //myserver/cgi-bin/download.cgi?.zip

(If you already have a query string, then just add a dummy 
arg to the end, so that the URI ends with .zip).

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to