[Catalyst-dev] hacking on Session + Session::State::Cookie
Jonathan Rockway
jon at jrock.us
Sat Sep 22 04:12:41 GMT 2007
I've been working on these two modules recently. That failing expires
test in the cookie dist (that has been giving me nightmares for the last
month or so :) is finally passing!
However, there is still some weird behavior that I'm noticing. =
C::P::Continuation only passes its tests if CATALYST_DEBUG is enabled,
and FormCanary (in git) can only access $c->session->{foo} if I call
$c->session in void context before accessing $c->request and /then/
$c->session->{whatever}. That smells buggy.
I tested some random dists in svn against the new Session code in trunk,
and all of that is passing. random =3D Store::[FastMmap|DBI],
Catalyst::Plugin::Authentication, and Angerwhale.
Anyway, below is a summary from IRC. I need some sleep before I can
tackle the remaining issues, so just know that there is some potentially
broken/fixed/incomplete/awesomely delicious code in trunk. No action is
required on anyone's part, I just want to let everyone know what's going
on so you don't have to wonder :)
IRC log:
18:57 <@jrockway> ok, i've figured out ::session
18:58 <@jrockway> the problem was that we were sending headers before
updating
the expiry, so it just got ignored
18:58 <@jrockway> that affected the $c->res->body case
18:58 <@jrockway> streaming ($c->res->write) was still broken
18:58 <@jrockway> because that never calls finalize, only finalize_headers
18:58 <@jrockway> so i move the expiry update to finalize_headers
18:58 <@jrockway> and then NEXT::finalize_headers
18:58 <@jrockway> and now everything works again
(editor's note: after i said that, I moved everything but the expiration
update back to finalize. so anything cookie related happens before
sending headers, but everything else happens after the headers and body
have been sent. as a result, that 06finalize test now passes again)
21:19 <@jrockway> catalyst::pluigin::continuation won't pass tests unless
CATALYST_DEBUG=3D1
21:19 <@jrockway> but, it appears that was the case before i touched
session...
21:22 <@jrockway> ahh, i know
21:22 <@jrockway> recently, calling "$c->session" is required before
$c->session->{whatever} will work
21:22 <@jrockway> i guess that depends on debug/no debug...
21:32 <@jrockway> unrelated
21:32 * jrockway pulls out hair
gnite. sorry this is incoherent :)
Regards,
Jonathan Rockway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 370 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst-dev/attachments/20070921/=
e2a5625e/signature.pgp
More information about the Catalyst-dev
mailing list