Revert "Move call to _save_session_expires to finalize_session"
Tomas Doran [Fri, 25 May 2012 13:49:33 +0000 (14:49 +0100)]
This reverts commit 94222de2be3cabb5236edfd948be1dea662e7a43.

lib/Catalyst/Plugin/Session.pm

index 09519b3..20f6ee3 100644 (file)
@@ -102,10 +102,8 @@ sub prepare_action {
 sub finalize_headers {
     my $c = shift;
 
-    # Force extension of session_expires before finalizing headers, so a possible cookie will be
-    # up to date. First call to session_expires will extend the expiry, subsequent calls will
-    # just return the previously extended value.
-    $c->session_expires;
+    # fix cookie before we send headers
+    $c->_save_session_expires;
 
     return $c->maybe::next::method(@_);
 }
@@ -126,7 +124,6 @@ sub finalize_session {
 
     $c->maybe::next::method(@_);
 
-    $c->_save_session_expires;
     $c->_save_session_id;
     $c->_save_session;
     $c->_save_flash;