perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Sparks" <>
Subject Re: Allowing the user to a download data
Date Wed, 01 Mar 2000 19:21:05 GMT
What you really want is the "Content-Disposition" header, something like:
Content-disposition: attachment; filename=$filename

Having said that, beware of buggy IE4 browsers that mess this up entirely...
as per MS KB article Q182315 at

If anyone has better ideas how to get content-disposition to work despite
MS, I'd love to hear it myself.  :-)

-----Original Message-----
From: Joseph R. Junkin <>
To: <>
Date: Wednesday, March 01, 2000 11:02 AM
Subject: Allowing the user to a download data

>In my application I allow the user to download a text file of database
>information. Right now, what I do is set the header 'type' in's
>header function to something like 'text/mydownloadtype'. I assume that
>because Netscape is unaware of any mime type of 'mydownloadtype' it
>brings up the 'save as' dialog box, which is what I want. Yet the name
>of the download file becomes the name of the script, which is not what I
>want. I would prefer to name the file, without actually having to create
>and store the file, i.e., I want the download to be dynamically created
>at the time then disappear.
>Q1) I want to do is force the browser (IE or Netscape) to start the
>textfile download process. Is there a standard or typical way that
>people do this either through's header call or directly through
>the modperl API?
>Q2) I want to force the name of the download file that appears inside
>the download box instead of the script name, even though the script is
>what is called as the file is created dynamically from it. In other
>words I don't want to generate and save the file then re-direct the user
>to it.
>Joe Junkin

View raw message