httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r1646282 - in /httpd/httpd/trunk: CHANGES modules/http/http_protocol.c
Date Wed, 17 Dec 2014 15:39:15 GMT
Author: rpluem
Date: Wed Dec 17 15:39:15 2014
New Revision: 1646282

URL: http://svn.apache.org/r1646282
Log:
* Fix If-Match handling:
  - We need to fail if we do NOT match.
  - ETag comparison only makes sense if we have an ETag

PR: 57358
Submitted by: Kunihiko Sakamoto <ksakamoto google.com>
Reviewed by: rpluem

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/http/http_protocol.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1646282&r1=1646281&r2=1646282&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Dec 17 15:39:15 2014
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
-  
+
+  *) mod_http: Fix incorrect If-Match handling. PR 57358
+     [Kunihiko Sakamoto <ksakamoto google.com>]
+
   *) mod_proxy_ajp: Fix handling of the default port (8009) in the
      ProxyPass and <Proxy> configurations.  PR 57259.  [Yann Ylavic].
 

Modified: httpd/httpd/trunk/modules/http/http_protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_protocol.c?rev=1646282&r1=1646281&r2=1646282&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_protocol.c (original)
+++ httpd/httpd/trunk/modules/http/http_protocol.c Wed Dec 17 15:39:15 2014
@@ -316,8 +316,8 @@ AP_DECLARE(ap_condition_e) ap_condition_
      */
     if ((if_match = apr_table_get(r->headers_in, "If-Match")) != NULL) {
         if (if_match[0] == '*'
-                || ((etag = apr_table_get(headers, "ETag")) == NULL
-                        && !ap_find_etag_strong(r->pool, if_match, etag))) {
+                || ((etag = apr_table_get(headers, "ETag")) != NULL
+                        && ap_find_etag_strong(r->pool, if_match, etag))) {
             return AP_CONDITION_STRONG;
         }
         else {
@@ -552,9 +552,6 @@ AP_DECLARE(int) ap_meets_conditions(requ
      */
     cond = ap_condition_if_match(r, r->headers_out);
     if (AP_CONDITION_NOMATCH == cond) {
-        not_modified = 0;
-    }
-    else if (cond >= AP_CONDITION_WEAK) {
         return HTTP_PRECONDITION_FAILED;
     }
 



Mime
View raw message