|
Line 0
Link Here
|
|
|
1 |
--- modules/dav/main/mod_dav.c.orig 2013-06-27 18:54:14.000000000 +0200 |
| 2 |
+++ modules/dav/main/mod_dav.c 2013-11-05 16:31:51.000000000 +0100 |
| 3 |
@@ -2733,7 +2733,9 @@ |
| 4 |
*/ |
| 5 |
if ((err = dav_validate_request(r, resource, depth, NULL, |
| 6 |
&multi_response, |
| 7 |
- DAV_VALIDATE_PARENT |
| 8 |
+ (is_move ? DAV_VALIDATE_PARENT |
| 9 |
+ :DAV_VALIDATE_RESOURCE |
| 10 |
+ |DAV_VALIDATE_NO_MODIFY) |
| 11 |
| DAV_VALIDATE_USE_424, |
| 12 |
NULL)) != NULL) { |
| 13 |
err = dav_push_error(r->pool, err->status, 0, |
| 14 |
--- modules/dav/main/mod_dav.h.orig 2013/10/03 05:06:08 1528717 |
| 15 |
+++ modules/dav/main/mod_dav.h 2013/10/03 05:29:35 1528718 |
| 16 |
@@ -1297,6 +1297,9 @@ |
| 17 |
the 424 DAV:response */ |
| 18 |
#define DAV_VALIDATE_USE_424 0x0080 /* return 424 status, not 207 */ |
| 19 |
#define DAV_VALIDATE_IS_PARENT 0x0100 /* for internal use */ |
| 20 |
+#define DAV_VALIDATE_NO_MODIFY 0x0200 /* resource is not being modified |
| 21 |
+ so allow even if lock token |
| 22 |
+ is not provided */ |
| 23 |
|
| 24 |
/* Lock-null related public lock functions */ |
| 25 |
DAV_DECLARE(int) dav_get_resource_state(request_rec *r, |
| 26 |
--- modules/dav/main/util.c.orig 2013/10/03 05:06:08 1528717 |
| 27 |
+++ modules/dav/main/util.c 2013/10/03 05:29:35 1528718 |
| 28 |
@@ -954,13 +954,16 @@ |
| 29 |
/* |
| 30 |
** For methods other than LOCK: |
| 31 |
** |
| 32 |
- ** If we have no locks, then <seen_locktoken> can be set to true -- |
| 33 |
+ ** If we have no locks or if the resource is not being modified |
| 34 |
+ ** (per RFC 4918 the lock token is not required on resources |
| 35 |
+ ** we are not changing), then <seen_locktoken> can be set to true -- |
| 36 |
** pretending that we've already met the requirement of seeing one |
| 37 |
** of the resource's locks in the If: header. |
| 38 |
** |
| 39 |
** Otherwise, it must be cleared and we'll look for one. |
| 40 |
*/ |
| 41 |
- seen_locktoken = (lock_list == NULL); |
| 42 |
+ seen_locktoken = (lock_list == NULL |
| 43 |
+ || flags & DAV_VALIDATE_NO_MODIFY); |
| 44 |
} |
| 45 |
|
| 46 |
/* |