From e858f16bfbfe12e61bc4293d13a156a9b8cdb47b Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Wed, 12 Mar 2008 16:07:46 +0000 Subject: [PATCH] * Restore the original request headers if the cached resource was stale, as they 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 | 3 +++ modules/cache/mod_cache.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGES b/CHANGES index 9354f1c508f..c2fe792f5cd 100644 --- 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 ] diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index 9ab36ce8733..0e49bf5efda 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -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; } } -- 2.47.2