cookie setting
Dave Harrison
dave at nullcube.com
Mon May 12 05:25:31 EDT 2003
ahem,
setting clear text in the cookie is simple, however I dont want clear text there, I want something a little less obviously decipherable.
I assume this is what encode and decode are meant to do ? (I could be wrong) ...
if my code as below is not how its meant to work can someone correct me ?
Dave
John J. Lee (jjl at pobox.com):
> 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
> --
> http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list