ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: Download to client from a cgi script?
by John J. Lee other posts by this author
Sep 21 2003 8:30PM messages near this date
Download to client from a cgi script? | Re: Download to client from a cgi script?
Xystein Johansen <oystein@[...].org>  writes:
[...]
>  How can I make the browser downlaod a cgi script from
>  /cgi-bin/. Obviously I can't make a link to it with
>  <a=href="/cgi-bin/script.cgi>, since tha script will be executed then.
>  
>  I see how Lutz in PP2E prints the script on the screen, but I want the
>  user to get the "save file" message box?

Don't put it in the cgi-bin?  There will be other ways, too, all of
which are entirely dependent on your web server and its configuration.
Anything regarded by your server as a cgi-script *shouldn't* be
downloadable, because that would risk security problems.  Some servers
will always regard anything ending in ".cgi" or ".py" or whatever as
CGI scripts, some will regard anything in a particular directory as
CGI scripts, some will do other things.


>  Same thing. What about a binary file? Printing a binary file with
>  getfile.cgi from PP2E is just silly. The surfer must be promped to
>  save. So, what I want is a script like getfile.cgi, that downloads
>  insted of prints the file.

I don't understand any of this paragraph.


>  (Maybe this is more a HTTP/HTML question than a Python question...)

None of the above: entirely a web server question.


John
-- 
http://mail.python.org/mailman/listinfo/python-list
Thread:
=?ISO-8859-1?Q?=D8ystein_Johansen?=
John J. Lee
Matthew Wilson

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved