philippe.marschall at gmail.com
Tue Sep 22 07:41:22 UTC 2009
2009/9/22 Miguel Enrique Cobá Martinez <miguel.coba at gmail.com>:
> Is with a redirect the only way to set a cookie in Seaside?
> The WACookieTest class says:
> | response |
> self session respond: [ :url |
> response := self session redirectResponseFor: url.
> response addCookie: (WACookie key: key value: value).
> response ].
> key := value := nil
> Also the method
> self session redirectWithCookie: (WACookie key: #kdy value: var).
> Can't I add a cookie to a given response without asking the browser to
> make a new request?
In Seaside 2.8 that's not possible because we don't have access to the
response. In Seaside 3.0 this is possible. If you want/need it in
Seaside 2.8 you'll probably want to add them to your session, add them
to the response in #returnResponse: and then nil them out.
More information about the seaside