|
Jonathan Gardner
jgardner at jonathangardner.net
Sat Jun 7 22:11:44 EST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 06 June 2003 10:02, Julio Mendoza wrote:
> the problem is here:***
>
> what is wrong in this code. this is for reading a cookie from brower.
>
> Thanks..
>
> def verificaraut(req, ID):
> import re
> galleta=getCookie(req.headers_in, ID) ******************
>
> if galleta==None:
> return '0',''
> lista=re.split(":",galleta)
>
> if lista[0]=='0':
> return '0',lista
> if lista[3]<>req.connection.remote_ip:
> return '0',lista
>
> return lista[0], lista
>
> def getCookie(headers_in, key):
> if headers_in.has_key('Cookie'):
> import Cookie
> C = Cookie.SmartCookie(headers_in['Cookie'])
> C.load(headers_in['Cookie'])
> if C.has_key(key):
> return C[key].value
> return None
>
What line in getCookie is giving you the problem?
- --
Jonathan Gardner
jgardner at jonathangardner.net
(was jgardn at alumni.washington.edu)
Live Free, Use Linux!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+4sWQWgwF3QvpWNwRAv8zAJ0YgfsbUXXVe2VtfR3tMXyk2O3rGQCfdsi3
KBAjmIpvSI1xVJJxAUPDyLM=
=Kjlg
-----END PGP SIGNATURE-----
|