[Catalyst] Make Catalyst NOT reset a cookie on a per action basis
steve at prodhub.com
Sun Aug 16 18:59:09 GMT 2009
On a per action basis, have Catalyst NOT reset cookies it finds using
Images are dispatched from a database (and therefore not statically
served). The rest of the app requires a cookie to be set, but for
images coming from a specific action, a cookie should NOT be set
because the browser will not cache an image with a cookie (it is
immediately stale). The result is no caching and a hit to the database
every time an image is requested.
WHAT I CAN SEE:
Catalyst engine calls "finalize_cookies" which resets every cookie it
finds. This takes place before the 'begin' method and the 'Set-Cookie'
header has already been dispatched. Therefore removing that header in
'begin' does nothing. If the original request did not present a
cookie, then Catalyst does not regurgitate the cookie and everything
Thanks for any guidance. It'd be great of there's a solution that
doesn't require constraining the cookie path.
Los Angeles, California
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst