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 2014/07/06 23:57:45 UTC
svn commit: r1608304 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS
docs/manual/rewrite/flags.xml modules/mappers/mod_rewrite.c
Author: covener
Date: Sun Jul 6 21:57:44 2014
New Revision: 1608304
URL: http://svn.apache.org/r1608304
Log:
* mod_rewrite: Support session cookies with the CO= flag when later parameters
are used. The doc for this implied the feature had been backported for
quite some time. PR56014
Submitted by: covener
Reviewed by: covener, ylavic, rpluem
Modified:
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/STATUS
httpd/httpd/branches/2.2.x/docs/manual/rewrite/flags.xml
httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=1608304&r1=1608303&r2=1608304&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Sun Jul 6 21:57:44 2014
@@ -1,10 +1,14 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.28
+ *) mod_rewrite: Support session cookies with the CO= flag when later parameters
+ are used. The doc for this implied the feature had been backported for
+ quite some time. PR56014 [Eric Covener]
+
*) mod_cache: Don't remove stale cache entries that cannot be conditionally
- revalidated. This prevents the thundring herd protection from serving
- stale responses during a revalidation. PR 50317.
- [Eric Covener, Jan Kaluza, Ruediger Pluem]
+ revalidated. This prevents the thundring herd protection from serving
+ stale responses during a revalidation. PR 50317.
+ [Eric Covener, Jan Kaluza, Ruediger Pluem]
*) core: Increase TCP_DEFER_ACCEPT socket option to from 1 to 30 seconds.
PR 41270. [Dean Gaudet <dean arctic org>]
Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=1608304&r1=1608303&r2=1608304&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Sun Jul 6 21:57:44 2014
@@ -99,13 +99,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * mod_rewrite: Support session cookies with the CO= flag when later parameters
- are used. The doc for this implied the feature had been backported for
- quite some time. PR56014
- trunk patch: http://svn.apache.org/viewvc?view=revision&revision=664333
- 2.2.x patch: http://people.apache.org/~covener/patches/httpd-2.2.x-rewrite-sessioncookie.diff
- +1 covener, ylavic, rpluem
-
* mod_cache, mod_disk_cache: Try to use the key of a possible open but
stale cache entry if there is one. This fixes problem when two different
cache locks have been created for single stale cache entry leading to two
Modified: httpd/httpd/branches/2.2.x/docs/manual/rewrite/flags.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/rewrite/flags.xml?rev=1608304&r1=1608303&r2=1608304&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/rewrite/flags.xml (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/rewrite/flags.xml Sun Jul 6 21:57:44 2014
@@ -139,12 +139,11 @@ security model.</dd>
<dl>
<dt>Lifetime</dt>
<dd>The time for which the cookie will persist, in minutes.</dd>
-<dd>By default, the cookie will persist only for the
-current browser session. If you need to specify any later
-parameter (Path, Secure, httponly), it is not currently
-possible to explicitly configure session lifetime. Note:
-Previous versions of this documentation erroneouly stated
-otherwise.</dd>
+<dd>A value of 0 indicates that the cookie will persist only for the
+current browser session. This is the default value if none is
+specified. Prior to 2.2.28, a value of 0 indicates immediate expiration
+and it was not possible to specify session lifetime if any later
+parameters (Path, Secure, httponly) were specified</dd>
<dt>Path</dt>
<dd>The path, on the current website, for which the cookie is valid,
Modified: httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c?rev=1608304&r1=1608303&r2=1608304&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c Sun Jul 6 21:57:44 2014
@@ -2420,23 +2420,30 @@ static void add_cookie(request_rec *r, c
if (expires) {
apr_time_exp_t tms;
- apr_time_exp_gmt(&tms, r->request_time
- + apr_time_from_sec((60 * atol(expires))));
- exp_time = apr_psprintf(r->pool, "%s, %.2d-%s-%.4d "
- "%.2d:%.2d:%.2d GMT",
- apr_day_snames[tms.tm_wday],
- tms.tm_mday,
- apr_month_snames[tms.tm_mon],
- tms.tm_year+1900,
- tms.tm_hour, tms.tm_min, tms.tm_sec);
+ long exp_min;
+
+ exp_min = atol(expires);
+ if (exp_min) {
+ apr_time_exp_gmt(&tms, r->request_time
+ + apr_time_from_sec((60 * exp_min)));
+ exp_time = apr_psprintf(r->pool, "%s, %.2d-%s-%.4d "
+ "%.2d:%.2d:%.2d GMT",
+ apr_day_snames[tms.tm_wday],
+ tms.tm_mday,
+ apr_month_snames[tms.tm_mon],
+ tms.tm_year+1900,
+ tms.tm_hour, tms.tm_min, tms.tm_sec);
+ }
}
cookie = apr_pstrcat(rmain->pool,
var, "=", val,
"; path=", path ? path : "/",
"; domain=", domain,
- expires ? "; expires=" : NULL,
- expires ? exp_time : NULL,
+ expires ? (exp_time ? "; expires=" : "")
+ : NULL,
+ expires ? (exp_time ? exp_time : "")
+ : NULL,
(secure && (!strcasecmp(secure, "true")
|| !strcmp(secure, "1")
|| !strcasecmp(secure,