You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2014/08/22 17:26:27 UTC

svn commit: r1619835 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_cache.c

Author: covener
Date: Fri Aug 22 15:26:27 2014
New Revision: 1619835

URL: http://svn.apache.org/r1619835
Log:
don't let handlers start with r->status = 304 during a failed revalidation

PR56881


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/cache/mod_cache.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1619835&r1=1619834&r2=1619835&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri Aug 22 15:26:27 2014
@@ -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
      <IfDefine foo> if $(foo) is used within the section.
      PR 56858 [Christophe Jaillet]

Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=1619835&r1=1619834&r2=1619835&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Fri Aug 22 15:26:27 2014
@@ -1203,6 +1203,8 @@ static apr_status_t cache_save_filter(ap
         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;