cookie setting
John J. Lee
jjl at pobox.com
Sun May 11 17:20:19 EDT 2003
Dave Harrison <dave at nullcube.com> writes:
[...]
> (1) How to I get rid of a users cookie ? Best I can think of at the
> moment is setting the expire time to the current time and having it
> expire that way.
http://www.netscape.com/newsref/std/cookie_spec.html
| * If a CGI script wishes to delete a cookie, it can do so by
| returning a cookie with the same name, and an expires time which
| is in the past. The path and name must match exactly in order for
| the expiring cookie to replace the valid cookie. This requirement
| makes it difficult for anyone but the originator of a cookie to
| delete a cookie.
> (2) Why when I use the following code am I getting an output tuple
> of ('123', '123') ?
[...]
> P.S Here is my cookie setting code as well :
>
> c = Cookie.SimpleCookie()
> c['3802Cookie'] = c.value_encode('123')
[...]
I don't think that's right.
c['3802Cookie'] = '123'
John
More information about the Python-list
mailing list