Commit 3e8b75ae authored by Paul Querna's avatar Paul Querna
Browse files

Correctly restore the HTTP status from the cache handler.

Submitted by: Hansjoerg Pehofer


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@220036 13f79535-47bb-0310-9956-ffa450edef68
parent ef272062
Loading
Loading
Loading
Loading
+3 −0
Changes for CHANGES: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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]
+5 −0
Changes for modules/cache/mod_cache.c: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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);