cgi - secure sessions

Kirk McDonald mooquack at suad.org
Wed Feb 1 20:48:05 EST 2006


GazaM wrote:
> What I have is a cgi script run through a server
> side include line in the html, which looks for the session cookie, if
> it is present will say 'logged in as "user"' and if the cookie isn't
> there will display a login form. Now, the big showstopper here is that,
> because session cookies are stored in http headers sent by the client
> (afaik) the cgi script can't get any, because the http headers are
> passed onto the html file and any cgi scripts inside don't get
> anything... is there a workaround possible? 

Python has a built-in Cookie module:

http://www.python.org/doc/2.4.2/lib/module-Cookie.html

It may simplify matters.

-Kirk McDonald



More information about the Python-list mailing list