set cookie problem (slightly OT)

drs drs at
Wed Apr 30 22:59:59 CEST 2003

"Carsten Gehling" <carsten at> wrote in message
news:mailman.1051695171.12347.python-list at
> > Fra: python-list-admin at
> > [mailto:python-list-admin at]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/" -->
> >
> > 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/" -->
> 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
.htaccess file

<Files index.html>
    Header add Set-Cookie "name=value"


More information about the Python-list mailing list