set cookie problem (slightly OT)
drs at ecp.cc
Wed Apr 30 22:59:59 CEST 2003
"Carsten Gehling" <carsten at gehling.dk> wrote in message
news:mailman.1051695171.12347.python-list at python.org...
> > Fra: python-list-admin at python.org
> > [mailto:python-list-admin at python.org]På vegne af drs
> > Sendt: 30. april 2003 04:13
> > Emne: set cookie problem (slightly OT)
> > I have a web directory (apache2/FreeBSD) with ssi enabled but not cgi.
> > order to run simple python scripts i use something like
> > <!--#exec cmd="/usr/local/bin/python /path/to/script.py" -->
> > which works surprisingly well. I cannot figure a way to set a cookie,
> > however, as i am not able to add to the header. Anyone have any
> > suggestions?
> Normally, Apache (and other webservers like IIS) pre-process headers
> you prefix the script name with "nph-". Try to do this:
> <!--#exec cmd="/usr/local/bin/python /path/to/nph-script.py" -->
> And - of course - rename your script accordingly. I haven't tried it, but
> should give you greater control with the headers.
[I might note that this is totally off topic now, but maybe worth
The above solution does not seem to work. My guess is that once ssi has
started, headers are already written. Instead, I added the following to a
Header add Set-Cookie "name=value"
More information about the Python-list