httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1536321 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS modules/session/mod_session.c
Date Mon, 28 Oct 2013 12:03:27 GMT
Author: jim
Date: Mon Oct 28 12:03:26 2013
New Revision: 1536321

URL: http://svn.apache.org/r1536321
Log:
Merge r1531683 from trunk:

mod_session: Reset the max-age on session save. PR 47476.

Submitted by: minfrin
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/session/mod_session.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1531683

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1536321&r1=1536320&r2=1536321&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Mon Oct 28 12:03:26 2013
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.7
 
+  *) mod_session: Reset the max-age on session save. PR 47476. [Alexey
+     Varlamov <alexey.v.varlamov gmail com>]
+
   *) mod_session: After parsing the value of the header specified by the
      SessionHeader directive, remove the value from the response. PR 55279.
      [Graham Leggett]

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1536321&r1=1536320&r2=1536321&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Mon Oct 28 12:03:26 2013
@@ -97,10 +97,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-    *) mod_session: Reset the max-age on session save. PR 47476.
-    trunk patch: http://svn.apache.org/r1531683
-    2.4.x patch: trunk patch works, modulo CHANGES
-    +1: minfrin, jim, druggeri
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:

Modified: httpd/httpd/branches/2.4.x/modules/session/mod_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/session/mod_session.c?rev=1536321&r1=1536320&r2=1536321&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/session/mod_session.c (original)
+++ httpd/httpd/branches/2.4.x/modules/session/mod_session.c Mon Oct 28 12:03:26 2013
@@ -144,9 +144,11 @@ static apr_status_t ap_session_load(requ
         }
     }
 
-    /* make sure the expiry is set, if present */
-    if (!zz->expiry && dconf->maxage) {
-        zz->expiry = now + dconf->maxage * APR_USEC_PER_SEC;
+    /* make sure the expiry and maxage are set, if present */
+    if (dconf->maxage) {
+        if (!zz->expiry) {
+            zz->expiry = now + dconf->maxage * APR_USEC_PER_SEC;
+        }
         zz->maxage = dconf->maxage;
     }
 
@@ -194,6 +196,11 @@ static apr_status_t ap_session_save(requ
             z->maxage = dconf->maxage;
         }
 
+        /* reset the expiry before saving if present */
+        if (z->dirty && z->maxage) {
+            z->expiry = now + z->maxage * APR_USEC_PER_SEC;
+        } 
+
         /* encode the session */
         rv = ap_run_session_encode(r, z);
         if (OK != rv) {



Mime
View raw message