CGI and HTTP header problem

Jeff Pinyan jeffp at crusoe.net
Sat Mar 11 18:57:19 EST 2000


[posted & mailed]

On Mar 11, Toralf Wittner said:

>Hi all,
>While it basically works, there is an annoying problem with the filename
>the 'Save as' browser dialog suggests. It offers the name of the CGI
>script rather than the name of the file one has chosen. As far as I can
>see, this is a problem with the HTTP header.

Utilize PATH_INFO's magic:

  http://www.foo.com/cgi-bin/program.cgi/filename.ext

If that's your URL, than the value of the PATH_INFO environment var is
"/filename.ext", and that will be what the file is defaulted to be saved
as.

-- 
MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve             japhy at pobox.com
http://www.pobox.com/~japhy/                  http://pinyaj.stu.rpi.edu/
PerlMonth - An Online Perl Magazine            http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc.    http://www.perlarchive.com/




More information about the Python-list mailing list