[mod_python] Cookie problem

Gregory (Grisha) Trubetskoy grisha at modpython.org
Fri Feb 4 19:45:17 EST 2005



On Fri, 4 Feb 2005 dagurp at heimsnet.is wrote:

> Hi,
> I create a cookie and set it to expire in 2 weeks like this:
>
> cookie = Cookie.Cookie('foo', bar)
> cookie.expires = time() + 1209600  # 2 weeks
> Cookie.add_cookie(req, cookie)
>
> But whatever I set "expires" to it is always set to "end of session".

How do you know this?

Try writing the cookie to the error log to see what your server sends out, 
with something like

 	req.log_error(str(cookie))

Grisha


More information about the Mod_python mailing list