SV: set cookie problem (slightly OT)

Carsten Gehling carsten at
Wed Apr 30 11:31:38 CEST 2003

> 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.  in
> 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 UNLESS
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 it
should give you greater control with the headers.

- Carsten

More information about the Python-list mailing list