Is an "off topic question" allowed so long as we don't do it to often??? ;)
I know there are plenty of html/cgi guru's out there on this list; I've
posted this to a CGI/HTML specific list and go zero replies... :(
Well here goes: I have a "download" form that posts a request for download
to a CGI. (some folks here may have seen it...) The CGI looks at various
information (like username, cookies, etc) and decides if the user has
"permissions" to download the file. The file is actually kept outside of
the HTTPD root directory, so it cannot be downloaded without going through
the cgi (and the name is hardcoded in the CGI for security).
If the CGI validates the user information, it sends a response header of
"Content-type: application/octet-stream", then dumps (/bin/cat) the file to
stdout. This causes the browser to popup a dialog box for "download" as is
expected. But here's the catch: the user think's they're downloading the
verification cgi (download.cgi), when in reality they are getting the file
they requested (something.tar.gz). This is the natural and logical behavior
of a download. I want to change it... I want the CGI to *somehow* tell the
browser that the name is different from what it expects...
any suggestions? surely this has been done before... maybe nonparsed
headers? maybe something so simple as a specific HTTP response header???
regards,
james
-------------------------------------------------------------------------
To unsubscribe, go to http://www.Hughes.com.au/extras/email/
This archive was generated by hypermail 2b30 : Mon Mar 04 2002 - 09:03:52 EST