Re: [Zope] newbie:cookie expiry problem

2005-04-13 Thread Cliff Ford
prabuddha ray wrote:
This may be very silly plz help
I gave this cookie expiry statement in a python script:
RESPONSE.expireCookie('login')
return context.REQUEST.RESPONSE.redirect('index_html')
but when i checked the cookie values in request page, it wasn't removed. 
the last redirect still worked.

when i put an if like this :
if (RESPONSE.expireCookie('login'))
return context.REQUEST.RESPONSE.redirect('index_html')
redirect didn't work. where am i wrong?
all the files are in same folder
I set a cookie to indicate a user is in Edit mode. The script that 
unsets Edit mode looks like this:

RESPONSE.expireCookie('editMode', path='/')
RESPONSE.redirect(REQUEST.HTTP_REFERER)
Logout is different in my case because the cookie is set by 
exUserFolder. I put this in the logout script:

context.acl_users.logout(context.REQUEST)
I have no idea (now) why it works.
HTH
Cliff
Nice short question!
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] newbie:cookie expiry problem

2005-04-12 Thread prabuddha ray
This may be very silly plz help
I gave this cookie expiry statement in a python script:


RESPONSE.expireCookie('login')

return context.REQUEST.RESPONSE.redirect('index_html')

but when i checked the cookie values in request page, it wasn't removed. 
the last redirect still worked.

when i put an if like this :
if (RESPONSE.expireCookie('login'))

return context.REQUEST.RESPONSE.redirect('index_html')

redirect dont work.

where am i wrong.
-- 
Share the vision of difference with ME
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] newbie:cookie expiry problem

2005-04-12 Thread prabuddha ray
This may be very silly plz help
I gave this cookie expiry statement in a python script:

RESPONSE.expireCookie('login')

return context.REQUEST.RESPONSE.redirect('index_html')

but when i checked the cookie values in request page, it wasn't removed. 
the last redirect still worked.

when i put an if like this :
if (RESPONSE.expireCookie('login'))

return context.REQUEST.RESPONSE.redirect('index_html')

redirect didn't work. where am i wrong?
all the files are in same folder

-- 
Share the vision of difference with ME
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )