You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2020/03/02 12:03:26 UTC

svn commit: r1874691 - /httpd/httpd/trunk/modules/session/mod_session.c

Author: covener
Date: Mon Mar  2 12:03:26 2020
New Revision: 1874691

URL: http://svn.apache.org/viewvc?rev=1874691&view=rev
Log:
restore/explain new session creation

followup to r1874673.  With the included providers for load/save this path should
not be taken.



Modified:
    httpd/httpd/trunk/modules/session/mod_session.c

Modified: httpd/httpd/trunk/modules/session/mod_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/session/mod_session.c?rev=1874691&r1=1874690&r2=1874691&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/session/mod_session.c (original)
+++ httpd/httpd/trunk/modules/session/mod_session.c Mon Mar  2 12:03:26 2020
@@ -153,6 +153,15 @@ static apr_status_t ap_session_load(requ
         }
     }
 
+    /* no luck, create a blank session. Note that the included session_load 
+     * providers will return new sessions during session_load when configured.
+     */
+    if (!zz) {
+        zz = (session_rec *) apr_pcalloc(r->pool, sizeof(session_rec));
+        zz->pool = r->pool;
+        zz->entries = apr_table_make(zz->pool, 10);
+    }
+
     /* make sure the expiry and maxage are set, if present */
     if (dconf->maxage) {
         if (!zz->expiry) {