Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70122100D0 for ; Sun, 13 Oct 2013 13:07:49 +0000 (UTC) Received: (qmail 64800 invoked by uid 500); 13 Oct 2013 13:07:44 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 64736 invoked by uid 500); 13 Oct 2013 13:07:44 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 64729 invoked by uid 99); 13 Oct 2013 13:07:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Oct 2013 13:07:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Oct 2013 13:07:40 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E43152388868; Sun, 13 Oct 2013 13:07:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1531683 - in /httpd/httpd/trunk: CHANGES modules/session/mod_session.c Date: Sun, 13 Oct 2013 13:07:19 -0000 To: cvs@httpd.apache.org From: minfrin@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131013130719.E43152388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: minfrin Date: Sun Oct 13 13:07:19 2013 New Revision: 1531683 URL: http://svn.apache.org/r1531683 Log: mod_session: Reset the max-age on session save. PR 47476. Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/modules/session/mod_session.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1531683&r1=1531682&r2=1531683&view=diff ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Sun Oct 13 13:07:19 2013 @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_session: Reset the max-age on session save. PR 47476. [Alexey + Varlamov ] + *) 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/trunk/modules/session/mod_session.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/session/mod_session.c?rev=1531683&r1=1531682&r2=1531683&view=diff ============================================================================== --- httpd/httpd/trunk/modules/session/mod_session.c (original) +++ httpd/httpd/trunk/modules/session/mod_session.c Sun Oct 13 13:07:19 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) {