Re: cgi-bin download script

by "Paul Roberts" <roberts_paul(at)bigfoot.com>

 Date:  Fri, 12 May 2000 22:58:58 +0100
 To:  "Kenneth Brody" <kenbrody(at)bestweb.net>,
"HWG techniques list" <hwg-techniques(at)hwg.org>
 References:  bestweb
  todo: View Thread, Original

You could use a script generated response page and insert the link on the
server so the user would get a page called
http://hostname/cgi-bin/download.cgi with a link to file.tgz and maybe a
meta refresh to start the download automatically ala tucows.


Paul Roberts

roberts_paul(at)bigfoot.com
================================
Paul Roberts  <roberts_paul(at)bigfoot.com>
  Web Design : CGI Scripts : e-Commerce
  Web Graphics : Databases : e-Marketing
================================


----- Original Message -----
From: Kenneth Brody <kenbrody(at)bestweb.net>
To: HWG techniques list <hwg-techniques(at)hwg.org>
Sent: Friday, May 12, 2000 3:53 AM
Subject: cgi-bin download script


> I've written cgi scripts to manage a members-only download area. (The
files
> are kept outside of the public_html directory for security.)  Everything
is
> working well except for one thing -- Netscape (and probably every browser)
> insists on using the script name as the default filename, requiring the
> user to type the correct filename when downloading.  (Example:  If you
> access if via "http://hostname/cgi-bin/download.cgi?file.tgz" you will be
> presented a "save as" box with "download.cgi" as the filename, rather than
> "file.tgz".)
>
> Any suggestions?  (I've read RFC 1945, and the closest thing I see is the
> "Location:" header, but that apparently just causes the browse to request
> the alternate URL which, of course, is invalid.)
>
> I'd prefer to remain HTTP 1.0-compliant, but I'll settle for 1.1 if it
> means that newer browsers will work and the older ones will just ignore
> it and present the "download.cgi" filename.
>
> While typing this, I see that 1.1 has "Content-Disposition: filename=xxx"
> that works (Netscape 4.72)...
>
> But, getting back to the original question, is there an HTTP/1.0-compliant
> method?
>
> --
>
>
+---------+----------------------------------+-----------------------------+
> | Kenneth |       kenbrody(at)bestweb.net       | "The opinions expressed
|
> |    J.   |                                  |  herein are not necessarily
|
> |  Brody  | http://www.bestweb.net/~kenbrody |  those of fP Technologies."
|
>
+---------+----------------------------------+-----------------------------+
> GCS (ver 3.12) d- s+++: a C++$(+++) ULAVHSC^++++$ P+>+++ L+(++) E-(---)
>     W++ N+ o+ K(---) w@ M@ V- PS++(+) PE@ Y+ PGP-(+) t+ R@ tv+() b+
>     DI+(++++) D---() G e* h---- r+++ y?
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA