[Catalyst] Session and adding cookie headers

Bill Moseley moseley at hank.org
Sat Nov 7 01:26:36 GMT 2009


Is it the intended behavior  to set a cookie any time the session is
*fetched* even if nothing is set in the session?

With a new  app with these added plugins:

    Cache
    Session
    Session::Store::Cache
    Session::State::Cookie

And if I just add my $ses =3D $c->session; to the index action in root then
that causes a Set-Cookie header to be set in the response. (And if cookies
are disabled on a browser then a new session id is created every request,
and expires is written to the store).

Not a big deal, but just curious if that was by design or just a side-effect
of how the session code works.

I typically use session cookies and don't set a cookie header in the
response if a valid session id was in the request cookie.



-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20091106/a9c3d=
403/attachment.htm


More information about the Catalyst mailing list