List Info

Thread: hacking on Session + Session::State::Cookie




hacking on Session + Session::State::Cookie
user name
2007-09-21 22:12:41
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-> if I call
$c->session in void context before accessing
$c->request and /then/
$c->session->.  That smells buggy.

I tested some random dists in svn against the new Session
code in trunk,
and all of that is passing.  random =
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=1
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-> 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


_______________________________________________
Catalyst-dev mailing list
Catalyst-devlists.rawmode.org
http://lists.rawmode.org/mailman/listinfo/catalyst-dev


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )