From: Eric Covener Date: Mon, 2 Mar 2020 12:03:26 +0000 (+0000) Subject: restore/explain new session creation X-Git-Tag: 2.5.0-alpha2-ci-test-only~1600 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f1ab3e2e283ef328d7a395d047037e5a05f37d1;p=thirdparty%2Fapache%2Fhttpd.git restore/explain new session creation 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 --- diff --git a/modules/session/mod_session.c b/modules/session/mod_session.c index 8a7c385a5ab..e448ffcb5ec 100644 --- a/modules/session/mod_session.c +++ b/modules/session/mod_session.c @@ -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) {