From 4cf6628ea5b33efab6db2faf65aa98b28a432978 Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Wed, 29 Mar 2017 11:22:44 +0200 Subject: [PATCH] cannot-modify-protected-property should be used with 403 Forbidden, not 409 Conflict see the end of https://tools.ietf.org/html/rfc4918#section-16 (WebDAV, Precondition/Postcondition XML Elements) --- inc/caldav-PROPPATCH.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/caldav-PROPPATCH.php b/inc/caldav-PROPPATCH.php index 2b4b114d..b25ff156 100644 --- a/inc/caldav-PROPPATCH.php +++ b/inc/caldav-PROPPATCH.php @@ -212,7 +212,7 @@ foreach( $setprops AS $k => $setting ) { case 'DAV::creationdate': case 'DAV::lockdiscovery': case 'DAV::supportedlock': - add_failure('set', $tag, 'HTTP/1.1 409 Conflict', translate("Property is read-only"), 'cannot-modify-protected-property'); + add_failure('set', $tag, 'HTTP/1.1 403 Forbidden', translate("Property is read-only"), 'cannot-modify-protected-property'); break; /** @@ -233,7 +233,7 @@ foreach( $rmprops AS $k => $setting ) { switch( $tag ) { case 'DAV::resourcetype': - add_failure('rm', $tag, 'HTTP/1.1 409 Conflict', + add_failure('rm', $tag, 'HTTP/1.1 403 Forbidden', translate("DAV::resourcetype may only be set to a new value, it may not be removed."), 'cannot-modify-protected-property'); break; @@ -242,7 +242,7 @@ foreach( $rmprops AS $k => $setting ) { $qry->QDo('UPDATE collection SET timezone = NULL WHERE dav_name = :dav_name', array( ':dav_name' => $dav_resource->dav_name()) ); } else { - add_failure('rm', $tag, 'HTTP/1.1 409 Conflict', + add_failure('rm', $tag, 'HTTP/1.1 403 Forbidden', translate("calendar-timezone property is only valid for a calendar."), 'cannot-modify-protected-property'); } break;