From bd15f714b3c6e6c0c9e26fc0bb75b1157f082643 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Fri, 26 Sep 2014 10:57:50 +0000 Subject: [PATCH] Merge r1619835, r1620461 from trunk: don't let handlers start with r->status = 304 during a failed revalidation PR56881 Fix typo in comment. Submitted by: covener, rjung Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1627745 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 7 ------- modules/cache/mod_cache.c | 2 ++ 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index bbb38da2ad..9970e0256b 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.4.11 + *) mod_cache: Avoid sending 304 responses during failed revalidations + PR56881. [Eric Covener] + *) mod_status: Honor client IP address using mod_remoteip. PR 55886. [Jim Jagielski] diff --git a/STATUS b/STATUS index 939c179f9e..1b22beb3e7 100644 --- a/STATUS +++ b/STATUS @@ -102,13 +102,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_cache: Avoid sending a 304 to an unconditional request during a - revalidation. PR56881 - trunk patch: http://svn.apache.org/r1619835 - http://svn.apache.org/r1620461 - 2.4.x patch: trunk works - +1: covener, jim, ylavic - * core: Add missing va_end spotted by cppcheck various: Silent some cppcheck warnings trunk patch: http://svn.apache.org/r1619297 diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index cd839ed7c5..1a47f021b8 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -1201,6 +1201,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"); + /* Currently 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; -- 2.40.0