[Tutor] Cookies??

Lindsay Davies Lindsay.Davies@moonshine.co.uk
Mon, 5 Feb 2001 21:38:20 +0000


Take a look at Guido's examples here...

http://www.python.org/doc/essays/ppt/sd99east/sld057.htm

Best wishes,

Lindsay



At 8:37 PM +0100 2/5/01, Pablo Mateo Vázquez wrote:
>Hi, my problem is:
>
>How to read the Cookie in a cgi program?
>
>I write:
>   c.load(os.environ["HTTP_COOKIE"])
>
>And I get the follow error:
>
>   def __getitem__(self, key): return self.data[key]
>   KeyError: HTTP_COOKIE
>
>The cookie was written in a previous cgi program:
>    c=Cookie.Cookie()
>    c["login"]=log_encrip
>    c["login"]["path"]=pass_encrip
>    c["login"]["expires"]=fecha_expira
>    c.output(header="Cookie:")
>...
>...
>print "Content-type: text/html"
>print c
>print  
>
>
>Can you said to me what is the problem?
>
>
>Thanks.
>
>_______________________________________________
>Tutor maillist  -  Tutor@python.org
>http://mail.python.org/mailman/listinfo/tutor