Network Working Group C. Daboo
Internet-Draft Apple Inc.
Intended status: Standards Track March 9, 2009
Expires: September 10, 2009
Extended MKCOL for WebDAV
draft-ietf-vcarddav-webdav-mkcol-04
Status of This Memo
This Internet-Draft is submitted to IETF in full conformance with the
provisions of BCP 78 and BCP 79. This document may contain material
from IETF Documents or IETF Contributions published or made publicly
available before November 10, 2008. The person(s) controlling the
copyright in some of this material may not have granted the IETF
Trust the right to allow modifications of such material outside the
IETF Standards Process. Without obtaining an adequate license from
the person(s) controlling the copyright in such materials, this
document may not be modified outside the IETF Standards Process, and
derivative works of it may not be created outside the IETF Standards
Process, except to format it for publication as an RFC or to
translate it into languages other than English.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
This Internet-Draft will expire on September 10, 2009.
Copyright Notice
Copyright (c) 2009 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Daboo Expires September 10, 2009 [Page 1]
Internet-Draft Extended MKCOL for WebDAV March 2009
Provisions Relating to IETF Documents in effect on the date of
publication of this document (http://trustee.ietf.org/license-info).
Please review these documents carefully, as they describe your rights
and restrictions with respect to this document.
Abstract
This specification extends the Web Distributed Authoring and
Versioning (WebDAV) MKCOL method to allow collections of arbitrary
resourcetype to be created and to allow properties to be set at the
same time.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Conventions Used in This Document . . . . . . . . . . . . . . 3
3. WebDAV extended MKCOL . . . . . . . . . . . . . . . . . . . . 4
3.1. Extended MKCOL Support . . . . . . . . . . . . . . . . . . 4
3.1.1. Example: Using OPTIONS for the Discovery of
Support for Extended MKCOL . . . . . . . . . . . . . . 5
3.2. Status Codes . . . . . . . . . . . . . . . . . . . . . . . 5
3.3. Additional Precondition for Extended MKCOL . . . . . . . . 5
3.4. Example: Successful Extended MKCOL Request . . . . . . . . 5
4. Replacing Existing MKxxx Methods . . . . . . . . . . . . . . . 6
4.1. MKCALENDAR Replacement . . . . . . . . . . . . . . . . . . 7
4.1.1. Example: Replacing MKCALENDAR with MKCOL . . . . . . . 7
5. XML Element Definitions . . . . . . . . . . . . . . . . . . . 9
5.1. mkcol XML Element . . . . . . . . . . . . . . . . . . . . 9
5.2. mkcol-response XML Element . . . . . . . . . . . . . . . . 9
6. Security Considerations . . . . . . . . . . . . . . . . . . . 10
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10
8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 10
9. Normative References . . . . . . . . . . . . . . . . . . . . . 10
Appendix A. Change History (to be removed prior to
publication as an RFC) . . . . . . . . . . . . . . . 11
Daboo Expires September 10, 2009 [Page 2]
Internet-Draft Extended MKCOL for WebDAV March 2009
1. Introduction
WebDAV [RFC4918] defines the HTTP [RFC2616] method MKCOL. This
method is used to create WebDAV collections on the server. However,
several WebDAV-based specifications (e.g., CalDAV [RFC4791]) define
"special" collections - ones which are identified by additional
values in the DAV:resourcetype property assigned to the collection
resource, or through other means. These "special" collections are
created by new methods (e.g., MKCALENDAR). The addition of a new
MKxxx method for each new "special" collection adds to server
complexity and is detrimental to overall reliability due to the need
to make sure intermediaries are aware of these methods.
This specification defined an extension to the WebDAV MKCOL method
that adds a request body allowing a client to specify WebDAV
properties to be set on the newly created collection or resource. In
particular, the DAV:resourcetype property can be used to create a
"special" collection, or other properties used to create a "special"
resource. This avoids the need to invent new MKxxx methods.
2. Conventions Used in This Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].
This document uses XML DTD fragments ([W3C.REC-xml-20081126], Section
3.2) as a purely notational convention. WebDAV request and response
bodies cannot be validated by a DTD due to the specific extensibility
rules defined in Section 17 of [RFC4918] and due to the fact that all
XML elements defined by this specification use the XML namespace name
"DAV:". In particular:
1. element names use the "DAV:" namespace,
2. element ordering is irrelevant unless explicitly stated,
3. extension elements (elements not already defined as valid child
elements) may be added anywhere, except when explicitly stated
otherwise,
4. extension attributes (attributes not already defined as valid for
this element) may be added anywhere, except when explicitly
stated otherwise.
When an XML element type in the "DAV:" namespace is referenced in
this document outside of the context of an XML fragment, the string
"DAV:" will be prefixed to the element type.
Daboo Expires September 10, 2009 [Page 3]
Internet-Draft Extended MKCOL for WebDAV March 2009
This document inherits, and sometimes extends, DTD productions from
Section 14 of [RFC4918].
3. WebDAV extended MKCOL
The WebDAV MKCOL request is extended to allow the inclusion of a
request body. The request body is an XML document containing a
single DAV:mkcol XML element as the root element. The Content-Type
request header MUST be set appropriately for an XML body (e.g., set
to "text/xml" or "application/xml"). XML-typed bodies for an MKCOL
request that do not have DAV:mkcol as the root element are reserved
for future usage.
One or more DAV:set XML elements may be included in the DAV:mkcol XML
element to allow setting properties on the collection as it is
created. In particular, to create a collection of a particular type,
the DAV:resourcetype XML element MUST be included in a DAV:set XML
element and MUST specify the expected resource type elements for the
new resource, that MUST include the DAV:collection element that needs
to be present for any WebDAV collection.
As per the PROPPATCH method ([RFC4918], Section 9.2), servers MUST
process any DAV:set instructions in document order (an exception to
the normal rule that ordering is irrelevant). Instructions MUST
either all be executed or none executed. Thus, if any error occurs
during processing, all executed instructions MUST be undone and a
proper error result returned. Failure to set a property value on the
collection MUST result in a failure of the overall MKCOL request.
If a server attempts to make any of the property changes in an
extended MKCOL request (i.e., the request is not rejected for high-
level errors before processing the body), the response MUST be an XML
document containing a single DAV:mkcol-response XML element, which
MUST contain DAV:propstat XML elements with the status of each
property.
In all other respects the behavior of the extended MKCOL request
follows that of the standard MKCOL request.
3.1. Extended MKCOL Support
A server supporting the features described in this document, MUST
include "extended-mkcol" as a field in the DAV response header from
an OPTIONS request on any URI that supports use of the extended MKCOL
method.
Daboo Expires September 10, 2009 [Page 4]
Internet-Draft Extended MKCOL for WebDAV March 2009
3.1.1. Example: Using OPTIONS for the Discovery of Support for Extended
MKCOL
>> Request <<
OPTIONS /addressbooks/users/ HTTP/1.1
Host: addressbook.example.com
>> Response <<
HTTP/1.1 200 OK
Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE
Allow: MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, REPORT, ACL
DAV: 1, 2, 3, access-control, extended-mkcol
Date: Sat, 11 Nov 2006 09:32:12 GMT
Content-Length: 0
3.2. Status Codes
As per Section 9.3.1 of [RFC4918].
3.3. Additional Precondition for Extended MKCOL
WebDAV ([RFC4918], Section 16) defines preconditions and
postconditions for request behavior. This specification adds the
following precondition for the extended MKCOL request.
Name: valid-resourcetype
Namespace: DAV:
Use with: Typically 403 (Forbidden)
Purpose: (precondition) -- The server MUST support the specified
resourcetype value for the specified collection.
3.4. Example: Successful Extended MKCOL Request
This example shows how the extended MKCOL request is used to create a
collection of a fictitious type "special-resource".
Daboo Expires September 10, 2009 [Page 5]
Internet-Draft Extended MKCOL for WebDAV March 2009
>> Request <<
MKCOL /home/special/ HTTP/1.1
Host: special.example.com
Content-Type: application/xml; charset="utf-8"
Content-Length: xxxx
Special Resource
>> Response <<
HTTP/1.1 201 Created
Cache-Control: no-cache
Date: Sat, 11 Nov 2006 09:32:12 GMT
Content-Type: application/xml; charset="utf-8"
Content-Length: xxxx
HTTP/1.1 200 OK
4. Replacing Existing MKxxx Methods
One of the goals of this extension is to eliminate the need for other
extensions to define their own variant of MKCOL to create the special
collections they need. This extension can be used to replace
existing MKxxx methods in other extensions as detailed below. If a
server supports this extension and the other extension listed, then
the server MUST support use of the extended MKCOL method to achieve
Daboo Expires September 10, 2009 [Page 6]
Internet-Draft Extended MKCOL for WebDAV March 2009
the same result as the MKxxx method of the other extension.
4.1. MKCALENDAR Replacement
CalDAV defines the MKCALENDAR method to create a calendar collection
as well as set properties during creation ([RFC4791], Section 5.3.1).
The extended MKCOL method can be used instead by specifying both DAV:
collection and CALDAV:calendar-collection XML elements in the DAV:
resourcetype property, set during the extended MKCOL request.
4.1.1. Example: Replacing MKCALENDAR with MKCOL
The first example below shows an MKCALENDAR request containing a
CALDAV:mkcalendar XML element in the request body, and returning a
CALDAV:mkcalendar-response XML element in the response body. The
second example shows the equivalent extended MKCOL request with the
same request and response XML elements.
>> MKCALENDAR Request <<
MKCALENDAR /home/lisa/calendars/events/ HTTP/1.1
Host: calendar.example.com
Content-Type: application/xml; charset="utf-8"
Content-Length: xxxx
Lisa's Events
Daboo Expires September 10, 2009 [Page 7]
Internet-Draft Extended MKCOL for WebDAV March 2009
>> MKCALENDAR Response <<
HTTP/1.1 201 Created
Cache-Control: no-cache
Date: Sat, 11 Nov 2006 09:32:12 GMT
Content-Type: application/xml; charset="utf-8"
Content-Length: xxxx
HTTP/1.1 200 OK
>> MKCOL Request <<
MKCOL /home/cyrus/calendars/events/ HTTP/1.1
Host: calendar.example.com
Content-Type: application/xml; charset="utf-8"
Content-Length: xxxx
Cyrus' Events
Daboo Expires September 10, 2009 [Page 8]
Internet-Draft Extended MKCOL for WebDAV March 2009
>> MKCOL Response <<
HTTP/1.1 201 Created
Cache-Control: no-cache
Date: Sat, 11 Nov 2006 09:32:12 GMT
Content-Type: application/xml; charset="utf-8"
Content-Length: xxxx
HTTP/1.1 200 OK
5. XML Element Definitions
5.1. mkcol XML Element
Name: mkcol
Namespace: DAV:
Purpose: Used in a request to specify properties to be set in an
extended MKCOL request, as well as any additional information
needed when creating the resource.
Description: This XML element is a container for the information
required to modify the properties on a collection resource as it
is created in an extended MKCOL request.
Definition:
5.2. mkcol-response XML Element
Name: mkcol-response
Namespace: DAV:
Daboo Expires September 10, 2009 [Page 9]
Internet-Draft Extended MKCOL for WebDAV March 2009
Purpose: Used in a response to indicate the status of properties
that were set or failed to be set during an extended MKCOL
request.
Description: This XML element is a container for the information
returned about a resource that has been created in an extended
MKCOL request.
Definition:
6. Security Considerations
This extension does not introduce any new security concerns beyond
those already described in HTTP and WebDAV.
7. IANA Considerations
This document does not require any actions on the part of IANA.
8. Acknowledgments
Thanks to Bernard Desruisseaux, Mike Douglass, Julian Reschke, and
Simon Vaillancourt.
9. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to
Indicate Requirement Levels", BCP 14,
RFC 2119, March 1997.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk,
H., Masinter, L., Leach, P., and T. Berners-
Lee, "Hypertext Transfer Protocol --
HTTP/1.1", RFC 2616, June 1999.
[RFC4791] Daboo, C., Desruisseaux, B., and L.
Dusseault, "Calendaring Extensions to WebDAV
(CalDAV)", RFC 4791, March 2007.
[RFC4918] Dusseault, L., "HTTP Extensions for Web
Distributed Authoring and Versioning
(WebDAV)", RFC 4918, June 2007.
[W3C.REC-xml-20081126] Paoli, J., Yergeau, F., Bray, T., Sperberg-
McQueen, C., and E. Maler, "Extensible Markup
Language (XML) 1.0 (Fifth Edition)", World
Daboo Expires September 10, 2009 [Page 10]
Internet-Draft Extended MKCOL for WebDAV March 2009
Wide Web Consortium Recommendation REC-xml-
20081126, November 2008,
.
Appendix A. Change History (to be removed prior to publication as an
RFC)
Changes in -04:
1. WGLC: minor wording tweaks.
2. WGLC: switch to using XML conventions text from [RFC5323].
3. WGLC: MAY -> may in section 3/paragraph 2.
4. WGLC: mkcol-response DTD - removed ANY.
5. WGLC: updated to W3C.REC-xml-20081126 reference.
Changes in -03:
1. Boiler plate update.
Changes in -02:
1. Minor formatting/wording changes proposed by Julian Reschke were
applied.
2. Removed reference to DeltaV entirely as the spec no longer
replaces the MKxxx DeltaV defines.
3. Added Namespace definition to precondition.
4. Added reference to 4918 XML extensibility rules.
5. Added statement that DAV:collection must be present in DAV:
resourcetype in the request.
6. Added statement on use of DTD fragments.
7. Added statement about setting proper Content-Type for the MKCOL
body.
8. Added statement that MKCOL bodies using a different root element
are reserved for future extensions.
Changes in -01:
Daboo Expires September 10, 2009 [Page 11]
Internet-Draft Extended MKCOL for WebDAV March 2009
1. Fixed an example.
Changes in -00:
1. Removed MKACTIVITY and MKWORKSPACE replacement behavior.
2. Added valid-resourcetype precondition.
Author's Address
Cyrus Daboo
Apple Inc.
1 Infinite Loop
Cupertino, CA 95014
USA
EMail: cyrus@daboo.name
URI: http://www.apple.com/
Daboo Expires September 10, 2009 [Page 12]