X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FSession.pm;h=5500182aad8c5bdac87272309ccb5741af5166d0;hb=6afac921e72ecb6671e1a6a0b51b9dc791316bc9;hp=8733eb8a9da399e61b69dee702e816a40233fa5b;hpb=2656f7b8960ebee337ec7535c15bbd18be0ff54a;p=catagits%2FCatalyst-Plugin-Session.git diff --git a/lib/Catalyst/Plugin/Session.pm b/lib/Catalyst/Plugin/Session.pm index 8733eb8..5500182 100644 --- a/lib/Catalyst/Plugin/Session.pm +++ b/lib/Catalyst/Plugin/Session.pm @@ -111,17 +111,20 @@ sub finalize_headers { # up to date. First call to session_expires will extend the expiry, subs # just return the previously extended value. $c->session_expires; + $c->finalize_session; return $c->maybe::next::method(@_); } +sub _needs_early_session_finalization { 0 } + sub finalize_body { my $c = shift; # We have to finalize our session *before* $c->engine->finalize_xxx is called, # because we do not want to send the HTTP response before the session is stored/committed to # the session database (or whatever Session::Store you use). - $c->finalize_session; + $c->_clear_session_instance_data; return $c->maybe::next::method(@_); } @@ -135,7 +138,6 @@ sub finalize_session { $c->_save_session; $c->_save_flash; - $c->_clear_session_instance_data; } sub _session_updated {