[Zope] Re: reading a cookie from another PATH??
Chris McDonough
chrism@zope.com
Thu, 6 Sep 2001 21:59:43 -0400
Oops, I was totally wrong. Sorry!
Try this instead:
<dtml-call "REQUEST.set('GUID', ZopeTime().timeTime()">
<dtml-call "RESPONSE.setCookie('GUID', REQUEST['GUID'], expires='Wed, 19 Feb
2020 14:28:00 GMT',domain='.bar.com', path='/')">
Or in a Python script:
req = context.REQUEST
guid = context.ZopeTime().timeTime()
req.set('GUID', guid)
req.RESPONSE.setCookie(
'GUID',
guid,
expires='Wed, 19 Feb 2020 14:28:00 GMT',
domain='.bar.com',
path='/'
)
----- Original Message -----
From: "Trevor Toenjes" <zope@toenjes.com>
To: "Chris McDonough" <chrism@zope.com>; "Trevor Toenjes"
<zope@toenjes.com>; "Oleg Broytmann" <phd@phd.pp.ru>; "Zope@Zope. Org"
<zope@zope.org>; "Roger Erens" <rlwm.erens@home.nl>
Sent: Thursday, September 06, 2001 9:39 PM
Subject: RE: [Zope] Re: reading a cookie from another PATH??
> > This would probably make it work:
> >
> > ###dtml-method - setGUID
> > <dtml-call "REQUEST.set('ts', ZopeTime())">
> > <dtml-call "REQUEST.set('uid_global',_.str(_.int(ts)))">
> > <dtml-call "REQUEST.set('GUID', uid_global, expires='Wed, 19 Feb 2020
> > 14:28:00 GMT',domain='.bar.com', path='/')">
> >>> <dtml-call "RESPONSE.setCookie(REQUEST['GUID'])">
> Chris,
> this is the error I get...
> Error Type: TypeError
> Error Value: setCookie() takes exactly 3 arguments (2 given)
> So I used the syntax below and get the same error that GUID doe snot
exist?
> Is this an acqisition/namespace thing?
>
> Is ...
>
> <dtml-call "RESPONSE.setCookie(REQUEST['GUID'],uid_global, expires='Wed,
19
> Feb 2020
> 14:28:00 GMT',domain='.bar.com', path='/')">
>
> the same thing as ...
>
> <dtml-call "REQUEST.set('GUID', uid_global, expires='Wed, 19 Feb 2020
> 14:28:00 GMT',domain='.bar.com', path='/')">
>
> Thanks,
> -Trevor
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>