]> granicus.if.org Git - apache/commitdiff
Merge r1677462 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 7 May 2015 16:28:19 +0000 (16:28 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 7 May 2015 16:28:19 +0000 (16:28 +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.

Submitted by: breser
Reviewed/backported by: jim

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

STATUS
modules/dav/main/util.c

diff --git a/STATUS b/STATUS
index 710c02865fe7fd0c76af8b81e3e52117181a02c4..92f823527f7582aef258d9f7d54ad656098c2872 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -105,15 +105,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, trawick, ylavic
-
   *) mod_authz_core: Allow "Require expr" to work when the expression is quoted,
      as in an example in the doc.  PR 56235
      trunk patch: http://svn.apache.org/r1585609
index e6207fde8c30313f4bf0ea55f0bf9e127fddcf9d..3d4b1ec3d85b7c0b1fb684c5085b313d8ff0bd50 100644 (file)
@@ -1595,8 +1595,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;