On Sat, May 26, 2007 at 03:49:23PM -0700, mla wrote: > Try changing Catalyst::Plugin::Session::finalize() to this: > > sub finalize { > my $c = shift; > > $c->NEXT::finalize(@_); > $c->finalize_session; > } > > Just flipped the calls so it finalizes last. Seems to fix it.
That's what .16 now has. But, if finalize calls finalize_headers then calling finalize_session after that is too late to get the cookies in the response. Which is why I'm not seeing a cookie in the response. Well, I get a cookie sent on the first request. I assume that's because my first request is asking for session info (when there is not yet) which ends up calling set_session_id and that calls update_session_cookie. But once I have a cookie (and thus a session) no more cookies are sent. The problem I had was I wanted access to the session data while processing cookies which by that time the session data had been cleared.[1] Should it be like this instead? sub finalize { my $c = shift; $c->finalize_session; $c->NEXT::finalize(@_); $c->_clear_session_instance_data; } sub finalize_session { my $c = shift; $c->NEXT::finalize_session; $c->_save_session_id; $c->_save_session; $c->_save_flash; $c->_save_session_expires; } [1] The result was when I tried to access the session a new session would then be created -- so my session id was ever-changing and I could never log in. -- Bill Moseley [EMAIL PROTECTED] _______________________________________________ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/