From: Eric Covener Date: Fri, 22 Aug 2014 15:26:27 +0000 (+0000) Subject: don't let handlers start with r->status = 304 during a failed revalidation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad199ff87dd2c5a3baa43ec92b565ce49d97833b;p=thirdparty%2Fapache%2Fhttpd.git don't let handlers start with r->status = 304 during a failed revalidation PR56881 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1619835 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index d1202da704d..404e80a2401 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_cache: Avoid sending 304 responses during failed revalidations + PR56881. [Eric Covener] + *) core: Avoid useless warning message when parsing a section guarded by if $(foo) is used within the section. PR 56858 [Christophe Jaillet] diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index 93bb9f78289..819dd14ebc9 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -1203,6 +1203,8 @@ static apr_status_t cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in) apr_table_unset(r->headers_in, "If-Range"); apr_table_unset(r->headers_in, "If-Unmodified-Since"); + /* Currentlty HTTP_NOT_MODIFIED, and after the redirect, handlers won't think to set status to HTTP_OK */ + r->status = HTTP_OK; ap_internal_redirect(r->unparsed_uri, r); return APR_SUCCESS;