]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1677462 from trunk.
authorYann Ylavic <ylavic@apache.org>
Mon, 11 May 2015 09:53:38 +0000 (09:53 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 11 May 2015 09:53:38 +0000 (09:53 +0000)
mod_dav: Avoid doing the walk on a COPY source for handling preconditions if
there are no preconditions provided.

* modules/dav/main/util.c:
  (dav_validate_request): avoid validating locks and ETags when there are
    no If headers providing them on a resource we aren't modifying.

Committed by: breser
Reviewed by: breser, ylavic, rjung
Backported by: ylavic

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1678710 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/dav/main/util.c

diff --git a/CHANGES b/CHANGES
index 5b26f3ffee3d5eaf300f4c62be0939337dd7ec30..6c0c49f771df0f89aa1bf1f4786cb5bdd5d90ca8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.30
 
+  *) dav_validate_request: avoid validating locks and ETags when there are
+     no If headers providing them on a resource we aren't modifying.
+     [Ben Reser]
+
   *) mod_log_config: Add %M format to output request duration in
      milliseconds.  [Ben Reser]
 
diff --git a/STATUS b/STATUS
index 208c4152020a0ddbe89b7ec25acef8bb9e76bdd2..3127c7ca27ef352981f0b796102d85728cee237d 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -101,15 +101,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_dav: Avoid some work that is unnecessary and often very time consuming.
-     This helps mitigate Subversion issue #4531:
-     http://subversion.tigris.org/issues/show_bug.cgi?id=4531
-     SVN has their own workaround for this going out that helps more but is a bit
-     of a hack.  This is as far as we can go without violating DAV in httpd.
-     trunk patch: http://svn.apache.org/r1677462
-     2.4.x patch: trunk works (modulo CHANGES)
-     +1: breser, ylavic, rjung
-
    * mod_rewrite: Turn static function get_server_name_for_url() into public
      ap_get_server_name_for_url() and use it where appropriate. This
      fixes mod_rewrite generating invalid URLs for redirects to IPv6
index ba856fa2880712c89555b4b5108d4b5b0d02d199..f374c65aca6e952c9faeed705aea9fc6c8054ece 100644 (file)
@@ -1570,8 +1570,10 @@ DAV_DECLARE(dav_error *) dav_validate_request(request_rec *r,
         }
     }
 
-    /* (1) Validate the specified resource, at the specified depth */
-    if (resource->exists && depth > 0) {
+    /* (1) Validate the specified resource, at the specified depth.
+     * Avoid the walk there is no if_header and we aren't planning
+     * to modify this resource. */
+    if (resource->exists && depth > 0 && !(!if_header && flags & DAV_VALIDATE_NO_MODIFY)) {
         dav_walker_ctx ctx = { { 0 } };
         dav_response *multi_status;