[Seaside] Cookies (again?)

Vadim Kolontsov vk at tvcom.ru
Mon May 17 16:33:28 CEST 2004


Avi Bryant wrote:

> That's a good point.  It would be pretty easy to add a set of 
> #redirectWithCookie:... methods to WASession, eg,
> 
> login
>     self loginIsSuccessful ifTrue:
>         [self session redirectWithCookie: 'username' value: self 
> username expiry: (DateAndTime now + 1 hour).
>         self answer: true]

I like the way, but it's not very convinient when you need to set 
multiple cookies.

May be just "Session>>addCookie" several times before redirect? Or 
"redirectWithCookies: anOrderedList"?

I think it worth to create something like WACookie, because cookie has 
several attributes - like expiration, path, domain, etc; also you might 
need to encode cookie value because it can contain semi-colon, comma or 
whitespace..

Best regards,
Vadim.


More information about the Seaside mailing list