diff options
author | Graham Leggett <minfrin@apache.org> | 2010-09-04 15:20:30 +0000 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2010-09-04 15:20:30 +0000 |
commit | c3084aa4dee9fd8700fd2ca43861aa33e8e1dadc (patch) | |
tree | 4b1184b6e80add16ec0a2e8607aa651ddf5f8af2 /modules/cache/cache_storage.c | |
parent | 8991d4795fffe53eab9e3f72e002b2dedbaebc47 (diff) | |
download | httpd-c3084aa4dee9fd8700fd2ca43861aa33e8e1dadc.tar.gz |
mod_cache: Check the request to determine whether we are allowed
to return cached content at all, and respect a "Cache-Control:
no-cache" header from a client. Previously, "no-cache" would
behave like "max-age=0".
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@992625 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/cache/cache_storage.c')
-rw-r--r-- | modules/cache/cache_storage.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/cache/cache_storage.c b/modules/cache/cache_storage.c index 9137fca0b0..cfc0fdfaa0 100644 --- a/modules/cache/cache_storage.c +++ b/modules/cache/cache_storage.c @@ -203,6 +203,11 @@ int cache_select(request_rec *r) if (rv != APR_SUCCESS) { return rv; } + + if (!ap_cache_check_allowed(r)) { + return DECLINED; + } + /* go through the cache types till we get a match */ h = apr_palloc(r->pool, sizeof(cache_handle_t)); |