From: Jim Jagielski
Date: Mon, 12 Jan 2009 14:07:10 +0000 (+0000)
Subject: Merge r729316, r729317 from trunk:
X-Git-Tag: 2.2.12~262
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cffdcdc51c67ace6c3111bbe5c18abc449aa437;p=thirdparty%2Fapache%2Fhttpd.git
Merge r729316, r729317 from trunk:
look for 'no-cache' in subprocess_env to prevent the saving
of an otherwise cacheable response.
document no-cache envvar
Submitted by: covener
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@733762 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/CHANGES b/CHANGES
index 6db07524572..504f9254117 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.12
+ *) mod_cache: Introduce 'no-cache' per-request environment variable
+ to prevent the saving of an otherwise cacheable response.
+ [Eric Covener]
+
*) core: Translate the the status line to ASCII on EBCDIC platforms in
ap_send_interim_response() and for locally generated "100 Continue"
responses. [Eric Covener]
diff --git a/STATUS b/STATUS
index 9c0eee855c3..db70741384a 100644
--- a/STATUS
+++ b/STATUS
@@ -94,15 +94,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
http://people.apache.org/~rederpj/backport_PR46342_simpleLDAPinit.diff
+1: rederpj, niq, covener
- * mod_cache: Introduce 'no-cache' per-request environment variable
- to prevent the saving of an otherwise cacheable response.
- trunk:
- http://svn.apache.org/viewvc?rev=729316&view=rev
- http://svn.apache.org/viewvc?rev=729317&view=rev
- 2.2.x:
- trunk works
- +1 covener, rpluem, niq
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
diff --git a/docs/manual/env.html.en b/docs/manual/env.html.en
index 31795e8dda2..f1014d95fd0 100644
--- a/docs/manual/env.html.en
+++ b/docs/manual/env.html.en
@@ -282,6 +282,15 @@
+
+
+ When set, mod_cache
will not save an otherwise
+ cacheable response. This environment variable does not influence
+ whether a response already in the cache will be served for the current
+ request.
+
+
+
diff --git a/docs/manual/env.xml b/docs/manual/env.xml
index 0e3acf3271b..e98732d8b7c 100644
--- a/docs/manual/env.xml
+++ b/docs/manual/env.xml
@@ -323,6 +323,15 @@
+ no-cache
+
+ When set, mod_cache will not save an otherwise
+ cacheable response. This environment variable does not influence
+ whether a response already in the cache will be served for the current
+ request.
+
+
+
nokeepalive
diff --git a/docs/manual/mod/mod_cache.html.en b/docs/manual/mod/mod_cache.html.en
index 9bc6739fead..3e69b2b95eb 100644
--- a/docs/manual/mod/mod_cache.html.en
+++ b/docs/manual/mod/mod_cache.html.en
@@ -164,6 +164,13 @@
CacheDisable /local_files
+ The no-cache
environment variable can be set to
+ disable caching on a finer grained set of resources.
+
+See also
+
@@ -213,7 +220,14 @@ manager
CacheEnable disk http://www.apache.org/
+ The no-cache
environment variable can be set to
+ disable caching on a finer grained set of resources.
+
+See also
+

diff --git a/docs/manual/mod/mod_cache.xml b/docs/manual/mod/mod_cache.xml
index 09aac5efffe..e0f3f3297d1 100644
--- a/docs/manual/mod/mod_cache.xml
+++ b/docs/manual/mod/mod_cache.xml
@@ -172,7 +172,11 @@ manager
CacheEnable disk http://www.apache.org/
+
The no-cache
environment variable can be set to
+ disable caching on a finer grained set of resources.
+
+
Environment Variables in Apache
@@ -190,8 +194,11 @@ manager
Example
CacheDisable /local_files
-
+ The no-cache
environment variable can be set to
+ disable caching on a finer grained set of resources.
+
+Environment Variables in Apache
CacheMaxExpire
diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c
index 257536e2332..a35b2abc602 100644
--- a/modules/cache/mod_cache.c
+++ b/modules/cache/mod_cache.c
@@ -540,6 +540,9 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
"*", NULL)) {
reason = "Vary header contains '*'";
}
+ else if (apr_table_get(r->subprocess_env, "no-cache") != NULL) {
+ reason = "environment variable 'no-cache' is set";
+ }
else if (r->no_cache) {
/* or we've been asked not to cache it above */
reason = "r->no_cache present";