summaryrefslogtreecommitdiff
path: root/modules/cache/cache_storage.c
diff options
context:
space:
mode:
authorGraham Leggett <minfrin@apache.org>2013-05-05 01:12:48 +0000
committerGraham Leggett <minfrin@apache.org>2013-05-05 01:12:48 +0000
commit0eb8aa4a488fb0b54a10b228294b5c3d856b971e (patch)
treeef7f60e345422d7e160d8de6ad5b8d8ffe3f4da1 /modules/cache/cache_storage.c
parent4d2b3c1a7dcc2bc5435409d413f5954f4132ad0c (diff)
downloadhttpd-0eb8aa4a488fb0b54a10b228294b5c3d856b971e.tar.gz
mod_cache: Honour Cache-Control: no-store in a request.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1479222 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/cache/cache_storage.c')
-rw-r--r--modules/cache/cache_storage.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/cache/cache_storage.c b/modules/cache/cache_storage.c
index 3d9c3d0b3c..52c371a078 100644
--- a/modules/cache/cache_storage.c
+++ b/modules/cache/cache_storage.c
@@ -199,6 +199,13 @@ int cache_select(cache_request_rec *cache, request_rec *r)
return DECLINED;
}
+ /* if no-cache, we can't serve from the cache, but we may store to the
+ * cache.
+ */
+ if (!ap_cache_check_no_cache(cache, r)) {
+ return DECLINED;
+ }
+
if (!cache->key) {
rv = cache_generate_key(r, r->pool, &cache->key);
if (rv != APR_SUCCESS) {
@@ -206,10 +213,6 @@ int cache_select(cache_request_rec *cache, request_rec *r)
}
}
- if (!ap_cache_check_allowed(cache, r)) {
- return DECLINED;
- }
-
/* go through the cache types till we get a match */
h = apr_palloc(r->pool, sizeof(cache_handle_t));