Hi Michal,I doubt that this is a good idea. The cookie is usually only a tiny amount of data compared to the rest of the request, so the chance of actually breaking something is not worth the potential benefit. However, if you really want to do this you could extend AgaviWebResponse, overwrite sendHttpResponseHeaders(). You can then go through the list of cookies in the request and if your cookie is set in the request you can remove it from the list of cookies to send before calling the parents sendHttpResponseHeaders() method.
cheers felix On Aug 2, 2009, at 3:15 PM, Michal Charemza wrote:
Hi, Is it possible to get access to cookies sent from the browser within the user class? Or have some sort of "global" action that is performed on every request (where I can read the cooke using the standard validation/action mechanism)? The reason: I am thinking about using cookies to transfer variables to JS. Although I'm not sure if this is a good idea, I am still interested on the best way to go about this if it were ;-). For example, I would like to avoid sending the cookie server->browser every time if it is not necessary. Say, if the browser sent the cookie in the request. To do this I would have to have access to the cookies to check if the browser sent it. Michal. _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
-- Felix Gilcher Bitextender GmbH Paul-Heyse-Str. 6 D-80336 München T: +49 89 57 08 15 16 F: +49 89 57 08 15 17 M: +49 172 840 88 28 [email protected] http://bitextender.com/ Amtsgericht München, HRB 174280 Geschäftsführer: David Zülke, Florian Clever
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
