<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">OBJECTIVE:<br><div>On a per action basis,&nbsp;have Catalyst&nbsp;<span class="Apple-style-span" style="text-decoration: underline; ">NOT</span>&nbsp;reset cookies it finds using 'Session::State::Cookie'.<div><br></div><div>PROBLEM:</div><div>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.</div><div><br></div><div>WHAT I CAN SEE:</div><div>Catalyst engine calls "finalize_cookies" which resets every cookie it finds. This takes place&nbsp;<span class="Apple-style-span" style="text-decoration: underline; ">before</span>&nbsp;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&nbsp;<span class="Apple-style-span" style="text-decoration: underline; ">not</span>&nbsp;present a cookie, then Catalyst does&nbsp;<span class="Apple-style-span" style="text-decoration: underline; ">not</span>&nbsp;regurgitate the cookie and everything works great.</div><div><br></div><div>Thanks for any guidance. It'd be great of there's a solution that doesn't require constraining the cookie path.</div><div><br></div><div>Appreciatively,</div><div><br></div><div>Steve Kleiman</div><div>Los Angeles, California</div></div></body></html>