From: Ruediger Pluem Date: Wed, 14 Apr 2010 12:00:11 +0000 (+0000) Subject: * Do NOT cache 206 responses in any case since we don't (yet) know how to X-Git-Tag: 2.3.6~210 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fa54a82f4acc5d2694b176431232b7634fabe5b;p=apache * Do NOT cache 206 responses in any case since we don't (yet) know how to cache partial responses. Fixes regression of r724093. PR: 49113 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@933919 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index 078456856c..9e1ac99ed0 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -734,7 +734,8 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in) * We include 304 Not Modified here too as this is the origin server * telling us to serve the cached copy. */ - if (exps != NULL || cc_out != NULL) { + if ((exps != NULL || cc_out != NULL) + && r->status != HTTP_PARTIAL_CONTENT) { /* We are also allowed to cache any response given that it has a * valid Expires or Cache Control header. If we find a either of * those here, we pass request through the rest of the tests. From @@ -747,6 +748,9 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in) * include the following: an Expires header (section 14.21); a * "max-age", "s-maxage", "must-revalidate", "proxy-revalidate", * "public" or "private" cache-control directive (section 14.9). + * + * But do NOT store 206 responses in any case since we + * don't (yet) cache partial responses. */ } else {