[Zope] Delete value from REQUEST

Mauricio Souza Lima mauricio.lima at varig.com
Thu Jan 22 07:23:43 EST 2004


What zope didnt like? what was the error message?


> -----Original Message-----
> From: zope-bounces at zope.org [mailto:zope-bounces at zope.org]On Behalf Of
> Ashley
> Sent: Thursday, January 22, 2004 8:03 AM
> To: zope at zope.org
> Subject: [Zope] Delete value from REQUEST
> 
> 
> Sorry if this is a really stupid question, but either way I'd realy
> appreciate some help!
> 
> I have a problem deleting a value "theClient" from REQUEST.
> The value is set initially using:
>  <dtml-call expr="RESPONSE.setCookie('theClient',whatever_value)">
> 
> I found some time ago this little external method posted by Daryl Tester:
> 
> ===========================================================
> def removeRequest(REQUEST, item):
>     "Remove an item from a REQUEST.form"
>     try:
>         del REQUEST.form[item]
>     except:
>         pass
>     return None
> ===========================================================
> 
> This obviously did not work straight away for this particular 
> item, since it
> was in the cookies section of REQUEST, so I changed it to del
> REQUEST.cookies[item]. (Please bear with any ignorance I may have 
> displayed
> here).
> 
> This initially appears to work fine. I call the external method 
> from within
> a page, and then view REQUEST while still on the same page, and theClient
> has disappeared. However, if I subsequently go to any other page 
> it is still
> there.
> 
> I have tried RESPONSE.expireCookie(item) in the external method, and Zope
> didn't seem to appreciate that!
> 
> What am I doing wrong?
> 
> TIA
> Ashley
> 
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope at 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 )



More information about the Zope mailing list