I ran into this problem fairly recently and discovered that the
only surefire solution is to put the filename at the end of the url.
The CGI script need not use it, but MSIE does.
-Gyepi
On Thu, Jan 04, 2001 at 05:04:29PM -0500, Anthony R. J. Ball wrote:
>
> Sorry, but no one seems to know from my normal sources.
>
> I want to have MSIE users click on a link, that goes
> to a cgi. I would then like this cgi to output a file.
> Any file... maybe foo.txt or cow.exe or gun.tar.gz.
> The secret is I just want it to go straight to a
> save as... screen. No open in current location junk,
> and certainly I don't want it to be displayed in the
> browser. But MSIE does this.
>
> Currently I do:
>
> Content-Type: Application/octet-stream
> Content-Disposition: attachment;filename="$file"
>
> where file is the name of my file, say foo.txt
>
> In Netscape, this works pretty well.
> In MSIE, the text file is displayed within the page
> blatantly ignoring my headers as it often does.
> if it is a tar.gz it asks me if I want to open it
> from the current location, or save it. I would really
> prefer just to save it, like netscape. Is this
> possible? Does anyone know how?
>
> Thanks - Ant
>
> PS When is the next meeting?
>
> --
> ___ __ __ __ _ _ ____ _ _ ____ ____
> / __)( )( ) /__\( \/ )( ___) ( \( )( ___)(_ _)
> \__ \ )(__)( /(__)\\ / )__) ) ( )__) )(
> (___/(______)(__)(__)\/ (____)()(_)\_)(____) (__)
> Apathy Error: Don't bother striking any key
>