summaryrefslogtreecommitdiff
path: root/modules/dav/main/util.c
diff options
context:
space:
mode:
authorBen Reser <breser@apache.org>2015-05-03 18:02:33 +0000
committerBen Reser <breser@apache.org>2015-05-03 18:02:33 +0000
commit40670acf6b06b35b46fb69e3b38950f14b43a2c2 (patch)
treed8aeaad7fd739d4581eecf6d53b8c392c10d4d94 /modules/dav/main/util.c
parenta8783b3fec9e6ed1579eb03d60811f7e1518532b (diff)
downloadhttpd-40670acf6b06b35b46fb69e3b38950f14b43a2c2.tar.gz
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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677462 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/dav/main/util.c')
-rw-r--r--modules/dav/main/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/dav/main/util.c b/modules/dav/main/util.c
index e6207fde8c..3d4b1ec3d8 100644
--- a/modules/dav/main/util.c
+++ b/modules/dav/main/util.c
@@ -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;