[Ietf-caldav] MKCOL versus MKCALENDAR and status code
Arnaud Quillaud
Arnaud.Quillaud at Sun.COM
Tue Jul 17 09:41:41 PDT 2007
Hello,
Both WebDAV MKCOL and CalDAV MKCALENDAR should fail if the Request-URI is already mapped.
If I look at the MKCOL definition (http://tools.ietf.org/html/rfc4918#section-9.3.1), I see a corresponding status code:
<<
405 (Method Not Allowed) - MKCOL can only be executed on an unmapped URL.
>>
but no precondition.
If I look at the MKCALENDAR definition (http://tools.ietf.org/html/rfc4791#section-5.3.1), I see a corresponding precondition:
<<
(DAV:resource-must-be-null): A resource MUST NOT exist at the Request-URI;
>>
but no specific status code.
The most common status code when sending back a precondition error is 403 (Forbidden).
Both MKCOL and MKCALENDAR define the meaning of this status code in their context in the same way:
<<
403 (Forbidden) - This indicates at least one of two conditions:
1) the server does not allow the creation of calendar collections
at the given location in its namespace, or 2) the parent
collection of the Request-URI exists but cannot accept members;
>>
So should MKCALENDAR return a 405 with a DAV:resource-must-be-null error body (and an Allow header), or a 403 with a DAV:resource-must-be-null error body ?
If 403 with a DAV:resource-must-be-null is more appropriate, is there any harm doing the same for MKCOL ?
Thanks,
Arnaud Q
More information about the Ietf-caldav
mailing list