From: Eric Covener Date: Wed, 24 Dec 2008 15:03:33 +0000 (+0000) Subject: look for 'no-cache' in subprocess_env to prevent the saving X-Git-Tag: 2.3.1~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=940a2bcccab269f913fa834c26e058e4324307ca;p=thirdparty%2Fapache%2Fhttpd.git look for 'no-cache' in subprocess_env to prevent the saving of an otherwise cacheable response. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@729316 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index ea0c9661310..677d290bcbf 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.3.1 [ When backported to 2.2.x, remove entry from this file ] + *) mod_cache: Introduce 'no-cache' per-request environment variable + to prevent the saving of an otherwise cacheable response. + [Eric Covener] + *) mod_rewrite: Introduce DiscardPathInfo|DPI flag to stop the troublesome way that per-directory rewrites append the previous notion of PATH_INFO to each substitution before evaluating subsequent rules. diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index dce16fe4579..b27c7fbb2ac 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -538,6 +538,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";