|
Necmettin Begiter
necmettin.begiter at gmail.com
Mon Jan 21 07:04:38 EST 2008
21 January 2008 Monday 10:49:57 tarihinde Matt Barnicle şunları yazmıştı:
> understand it, if i want to effectively remove a cookie from the UA, there
> is no way to do it, so u just have to set the expiry date to a time in the
> past, right? but any efforts i make seem to fail. here is the code:
>
> cookie = Cookie.Cookie('user_name', cookies['user_name'].value)
> cookie.expires = int(time.time()) - 31536000 # minus 1 year from now
> Cookie.add_cookie(self.req, cookie)
Might be a problem of using int(), examples in the mod_python documentation don't use int():
http://www.modpython.org/live/current/doc-html/pyapi-cookie-example.html
|