Extended MKCOL for WebDAV
Apple Inc.
1 Infinite Loop
Cupertino
CA
95014
USA
cyrus@daboo.name
http://www.apple.com/
Applications
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.
WebDAV defines the HTTP method MKCOL. This method is used to create WebDAV collections on the server. However, several WebDAV-based specifications (e.g., CalDAV ) 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 proposes 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.
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 .
Definitions of XML elements in this document use XML element type declarations (as found in XML Document Type Declarations), described in Section 3.2 of .
When XML element types in the namespace "DAV:" are referenced in this document outside of the context of an XML fragment, the string "DAV:" will be prefixed to the element type names.
Processing of XML by clients and servers MUST follow the rules described in Appendix A of .
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 (, 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.
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.
As per Section 9.3.1 of .
WebDAV (, Section 16) defines preconditions and postconditions for request behavior. This specification adds the following precondition for the extended MKCOL request.
valid-resourcetype
DAV:
Typically 403 (Forbidden)
(precondition) -- The server MUST support the specified resourcetype value for the specified collection.
This example shows how the extended MKCOL request is used to create a collection of a fictitious type "special-resource".
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 the same result as the MKxxx method of the other extension.CalDAV defines the MKCALENDAR method to create a calendar collection as well as set properties during creation (, 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.
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.
mkcol
DAV:
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.
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.
mkcol-response
DAV:
Used in a response to indicate the status of properties that were set or failed to be set during an extended MKCOL request.
This XML element is a container for the information returned about a resource that has been created in an extended MKCOL request.
This extension does not introduce any new security concerns beyond those already described in HTTP and WebDAV.
This document does not require any actions on the part of IANA.
Several people suggested this approach, including Julian Reschke and Bernard Desruisseaux. Thanks also to Mike Douglass.
Key words for use in RFCs to Indicate Requirement LevelsHarvard University1350 Mass. Ave.CambridgeMA 02138- +1 617 495 3864sob@harvard.edu
General
keyword
In many standards track documents several words are used to signify
the requirements in the specification. These words are often
capitalized. This document defines these words as they should be
interpreted in IETF documents. Authors who follow these guidelines
should incorporate this phrase near the beginning of their 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
RFC 2119.
Note that the force of these words is modified by the requirement
level of the document in which they are used.
Hypertext Transfer Protocol -- HTTP/1.1Department of Information and Computer ScienceUniversity of California, IrvineIrvineCA92697-3425+1(949)824-1715fielding@ics.uci.eduWorld Wide Web ConsortiumMIT Laboratory for Computer Science, NE43-356545 Technology SquareCambridgeMA02139+1(617)258-8682jg@w3.orgCompaq Computer CorporationWestern Research Laboratory250 University AvenuePalo AltoCA94305mogul@wrl.dec.comWorld Wide Web ConsortiumMIT Laboratory for Computer Science, NE43-356545 Technology SquareCambridgeMA02139+1(617)258-8682frystyk@w3.orgXerox CorporationMIT Laboratory for Computer Science, NE43-3563333 Coyote Hill RoadPalo AltoCA94034masinter@parc.xerox.comMicrosoft Corporation1 Microsoft WayRedmondWA98052paulle@microsoft.comWorld Wide Web ConsortiumMIT Laboratory for Computer Science, NE43-356545 Technology SquareCambridgeMA02139+1(617)258-8682timbl@w3.org
The Hypertext Transfer Protocol (HTTP) is an application-level
protocol for distributed, collaborative, hypermedia information
systems. It is a generic, stateless, protocol which can be used for
many tasks beyond its use for hypertext, such as name servers and
distributed object management systems, through extension of its
request methods, error codes and headers . A feature of HTTP is
the typing and negotiation of data representation, allowing systems
to be built independently of the data being transferred.
HTTP has been in use by the World-Wide Web global information
initiative since 1990. This specification defines the protocol
referred to as "HTTP/1.1", and is an update to RFC 2068 .
Calendaring Extensions to WebDAV (CalDAV)Apple Inc.1 Infinite LoopCupertinoCA95014USAcyrus@daboo.namehttp://www.apple.com/Oracle Corporation600 Blvd. de Maisonneuve WestSuite 1900MontrealQCH3A 3J2CANADAbernard.desruisseaux@oracle.comhttp://www.oracle.com/CommerceNet169 University Ave.Palo AltoCA94301USAldusseault@commerce.nethttp://commerce.net/
Applications
calschedcalschcaldavcalendarcalendaringschedulingwebdaviCaliCalendariTIPtext/calendarHTTP
This document defines extensions to the Web Distributed Authoring
and Versioning (WebDAV) protocol to specify a standard way of
accessing, managing, and sharing calendaring and scheduling
information based on the iCalendar format. This document
defines the "calendar-access" feature of CalDAV.
HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)Web Distributed Authoring and Versioning (WebDAV) consists of a set of methods, headers, and content-types ancillary to HTTP/1.1 for the management of resource properties, creation and management of resource collections, URL namespace manipulation, and resource locking (collision avoidance).</t><t> RFC 2518 was published in February 1999, and this specification obsoletes RFC 2518 with minor revisions mostly due to interoperability experience. [STANDARDS TRACK]Extensible Markup Language (XML) 1.0 (Fourth Edition)Changes from -02:
Boiler plate update.Changes from -01:
Minor formatting/wording changes proposed by Julian Reschke were applied.Removed reference to DeltaV entirely as the spec no longer replaces the MKxxx DeltaV defines.Added Namespace definition to precondition.Added reference to 4918 XML extensibility rules.Added statement that DAV:collection must be present in DAV:resourcetype in the request.Added statement on use of DTD fragments.Added statement about setting proper Content-Type for the MKCOL body.Added statement that MKCOL bodies using a different root element are reserved for future extensions.Changes from -00:
Fixed an example.Changes from draft-daboo-webdav-mkcol-00:
Removed MKACTIVITY and MKWORKSPACE replacement behavior.Added valid-resourcetype precondition.