]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Restore the original request headers if the cached resource was stale, as they
authorRuediger Pluem <rpluem@apache.org>
Wed, 12 Mar 2008 16:07:46 +0000 (16:07 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 12 Mar 2008 16:07:46 +0000 (16:07 +0000)
  may be needed by further output filters like the byterange filter to make the
  correct decisions.

PR: 44579

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@636386 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/cache/mod_cache.c

diff --git a/CHANGES b/CHANGES
index 9354f1c508fb92d3b516fcdffb568e0f422684ce..c2fe792f5cd7b5be8c6cf0c852544f11bac8f1a6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) mod_cache: Handle If-Range correctly if the cached resource was stale.
+     PR 44579 [Ruediger Pluem]
+
   *) mod_speling: remove regression from 1.3/2.0 behavior and
      drop dependency between mod_speling and AcceptPathInfo.
      PR 43562 [Jose Kahan <jose w3.org>]
index 9ab36ce87330123d6fc5dbd199423548cabb2ca8..0e49bf5efda43018771def031e92f5e2423feb71 100644 (file)
@@ -613,6 +613,12 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
             cache->provider->remove_entity(cache->stale_handle);
             /* Treat the request as if it wasn't conditional. */
             cache->stale_handle = NULL;
+            /*
+             * Restore the original request headers as they may be needed
+             * by further output filters like the byterange filter to make
+             * the correct decisions.
+             */
+            r->headers_in = cache->stale_headers;
         }
     }