]> granicus.if.org Git - apache/commitdiff
* Do NOT cache 206 responses in any case since we don't (yet) know how to
authorRuediger Pluem <rpluem@apache.org>
Wed, 14 Apr 2010 12:00:11 +0000 (12:00 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 14 Apr 2010 12:00:11 +0000 (12:00 +0000)
  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

modules/cache/mod_cache.c

index 078456856c970341b5e19be02ba4aa1e9bfcd3ea..9e1ac99ed0e8e4c1823c99376429309bfd021c84 100644 (file)
@@ -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 {