]> granicus.if.org Git - apache/commitdiff
Correctly restore the HTTP status from the cache handler.
authorPaul Querna <pquerna@apache.org>
Thu, 21 Jul 2005 11:37:07 +0000 (11:37 +0000)
committerPaul Querna <pquerna@apache.org>
Thu, 21 Jul 2005 11:37:07 +0000 (11:37 +0000)
Submitted by: Hansjoerg Pehofer

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

CHANGES
modules/cache/mod_cache.c

diff --git a/CHANGES b/CHANGES
index c69a902b6d65ff9c91df8f477a7061d828760885..d8cb523903fd0ac098fe8eb706154fb46abcac93 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache 2.1.7
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) mod_cache: Restore the HTTP status of cached responses.
+     [Hansjoerg Pehofer <hansjoerg.pehofer uibk.ac.at>]
+
   *) mod_cache: Store varied contents all in the same prefix for a varied URI.
      [Paul Querna]
 
index 10e61c8f2989fd189188c31737d4662115115ffe..be92bff5aab8062378244f57eec54379c5f1f1b4 100644 (file)
@@ -200,6 +200,11 @@ static int cache_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
     ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r->server,
                  "cache: running CACHE_OUT filter");
 
+    /* restore status of cached response */
+    /* XXX: This exposes a bug in mem_cache, since it does not 
+     * restore the status into it's handle. */
+    r->status = cache->handle->status;
+
     /* recall_headers() was called in cache_select_url() */
     cache->provider->recall_body(cache->handle, r->pool, bb);