Re-2: [Zope] Problems with setCookie

Vahur Rebas vahur at tpu.ee
Fri Aug 27 03:56:03 EDT 2004


Ok, I was wrong. Did some digging and setCookie
function docstring says:
         Set an HTTP cookie on the browser

         The response will include an HTTP header that sets a cookie on
         cookie-enabled browsers with a key "name" and value
         "value". This overwrites any previously set value for the
         cookie in the Response object.

Maybe use appendCookie() then?


Vahur

> Hello,
> 
> As i know, there's always only one cookie for one url.
> And 'test1' is the key with it's value 'value1'.
> 
> like:
> ----------------------- cookie-souce
> test_data1
> "t1"
> xf130lg/
> 1024
> 2778255872
> 30795568
> 2735860320
> 29657955
> *
> test_data2
> "t2"
> xf130lg/
> 1024
> 2778255872
> 30795568
> 2735860320
> 29657955
> *
> test_data3
> "t3"
> xf130lg/
> 1024
> 2778255872
> 30795568
> 2735860320
> 29657955
> *
> -----------------------
> 
> the 'problem'-server only gets
> ----------------------- cookie-souce
> test_data3
> "t3"
> xf130lg/
> 1024
> 2778255872
> 30795568
> 2735860320
> 29657955
> *
> -----------------------
> with the same script...
> 
> Thanks for help
> regards
> Jens Walte
> 
> 
> 
> -------- Original Message --------
> Subject: Re: [Zope] Problems with setCookie (26-Aug-2004 18:12)
> From:    vahur at tpu.ee
> To:      jw at obelix.bb.kk.net
> 
> 
>>jens.walte at kk.net wrote:
>>
>>
>>>Hello,
>>>
>>>the following source should set 3 values to a cookie:
>>>
>>><dtml-call "RESPONSE.setCookie('test1', 'value1', path='/', expires='Wed, 
>>
>>20 Feb 2020 20:00:00 GMT')"> 
>>
>>><dtml-call "RESPONSE.setCookie('test2', 'value2', path='/', expires='Wed, 
>>
>>20 Feb 2020 20:00:00 GMT')"> 
>>
>>><dtml-call "RESPONSE.setCookie('test3', 'value3', path='/', expires='Wed, 
>>
>>20 Feb 2020 20:00:00 GMT')"> 
>>
>>>but after this there's only one value in the cookie! (normaly 'value3'?)
>>>
>>>Does anybody knows the reason?
>>>
>>> 
>>>
>>




More information about the Zope mailing list