From: Ruediger Pluem Date: Wed, 12 Mar 2008 16:07:46 +0000 (+0000) Subject: * Restore the original request headers if the cached resource was stale, as they X-Git-Tag: 2.3.0~883 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e858f16bfbfe12e61bc4293d13a156a9b8cdb47b;p=thirdparty%2Fapache%2Fhttpd.git * 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 --- 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; } }