OBJECTIVE:
On a per action basis, have Catalyst NOT reset cookies it finds using 'Session::State::Cookie'.

PROBLEM:
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 works great.

Thanks for any guidance. It'd be great of there's a solution that doesn't require constraining the cookie path.

Appreciatively,

Steve Kleiman
Los Angeles, California
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to