]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
restore/explain new session creation
authorEric Covener <covener@apache.org>
Mon, 2 Mar 2020 12:03:26 +0000 (12:03 +0000)
committerEric Covener <covener@apache.org>
Mon, 2 Mar 2020 12:03:26 +0000 (12:03 +0000)
followup to r1874673.  With the included providers for load/save this path should
not be taken.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1874691 13f79535-47bb-0310-9956-ffa450edef68

modules/session/mod_session.c

index 8a7c385a5abad1cf4fa0bf99d03f9ea192f15d47..e448ffcb5ec6b05abee61945e16e9e5135ee5b6e 100644 (file)
@@ -153,6 +153,15 @@ static apr_status_t ap_session_load(request_rec * r, session_rec ** z)
         }
     }
 
+    /* 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) {