Independent Submission K. Murchison Internet-Draft CMU Updates: 3253, 4791, 4918, 5689, 5995 (if approved) May 17, 2013 Intended status: Standards Track Expires: November 18, 2013 Use of the Prefer Header Field in Web Distributed Authoring and Versioning (WebDAV) draft-murchison-webdav-prefer-03 Abstract This specification defines how the HTTP Prefer header can be used by a WebDAV client to request that certain behaviors be employed by a server while constructing a response to a successful request. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. 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." This Internet-Draft will expire on November 18, 2013. Copyright Notice Copyright (c) 2013 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 Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Murchison Expires November 18, 2013 [Page 1] Internet-Draft Prefer in WebDAV May 2013 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 2. Reducing WebDAV Response Verbosity with "return=minimal" . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Minimal PROPFIND Response . . . . . . . . . . . . . . . . 4 2.1.1. Example: Typical PROPFIND request/response . . . . . 4 2.1.2. Example: Minimal PROPFIND request/response . . . . . 5 2.1.3. Example: Minimal PROPFIND request/response with an empty DAV:propstat element . . . . . . . . . . . . . 6 2.2. Minimal REPORT Response . . . . . . . . . . . . . . . . . 7 2.2.1. Example: Typical REPORT request/response . . . . . . 8 2.2.2. Example: Minimal REPORT request/response . . . . . . 9 2.3. Minimal PROPPATCH Response . . . . . . . . . . . . . . . 11 2.3.1. Example: Typical PROPPATCH request/response . . . . . 11 2.3.2. Example: Minimal PROPPATCH request/response . . . . . 12 2.4. Minimal MKCALENDAR / MKCOL Response . . . . . . . . . . . 13 2.4.1. Example: Verbose MKCOL request/response . . . . . . . 13 2.4.2. Example: Minimal MKCOL request/response . . . . . . . 14 3. Reducing WebDAV Round-Trips with "return=representation" . . . . . . . . . . . . . . . . . . . 15 3.1. Example: Typical resource creation and retrieval via POST + GET . . . . . . . . . . . . . . . . . . . . . 15 3.2. Example: Streamlined resource creation and retrieval via POST . . . . . . . . . . . . . . . . . . . 17 4. The "depth-noroot" Processing Preference . . . . . . . . . . 19 4.1. Example: Typical PROPFIND request/response with Depth:1 20 4.2. Example: PROPFIND request/response with Depth:1 and Prefer:depth-noroot . . . . . . . . . . . . . . . . . 21 5. Implementation Status . . . . . . . . . . . . . . . . . . . . 23 5.1. Cyrus . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.2. Calendar and Contacts Server . . . . . . . . . . . . . . 23 5.3. Bedework . . . . . . . . . . . . . . . . . . . . . . . . 23 5.4. DAViCal . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.5. CalDAVTester . . . . . . . . . . . . . . . . . . . . . . 24 6. Security Considerations . . . . . . . . . . . . . . . . . . . 24 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 24 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 25 9.1. Normative References . . . . . . . . . . . . . . . . . . 25 9.2. Informative References . . . . . . . . . . . . . . . . . 26 Appendix A. The Brief and Extended Depth Request Header Fields . 26 Appendix B. Open Issues . . . . . . . . . . . . . . . . . . . . 26 Appendix C. Change Log . . . . . . . . . . . . . . . . . . . . . 27 C.1. Since -02 . . . . . . . . . . . . . . . . . . . . . . . . 27 C.2. Since -01 . . . . . . . . . . . . . . . . . . . . . . . . 27 C.3. Since -00 . . . . . . . . . . . . . . . . . . . . . . . . 27 Murchison Expires November 18, 2013 [Page 2] Internet-Draft Prefer in WebDAV May 2013 C.4. Since CalConnect XXIV . . . . . . . . . . . . . . . . . . 28 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 28 1. Introduction [I-D.snell-http-prefer] defines the HTTP Prefer request header field and the "return=minimal" preference which indicates that a client wishes for the server to return a minimal response to a successful request, but states that what constitutes an appropriate minimal response is left solely to the discretion of the server. Section 2 of this specification defines precisely what is expected of a server when constructing minimal responses to successful WebDAV [RFC4918] requests. [I-D.snell-http-prefer] also defines the "return=representaion" preference which indicates that a client wishes for the server to include an entity representing the current state of the resource in the response to a successful request. The behavior of this preference with WebDAV [RFC4918] requests needs no further clarification, but Section 3 of this specification makes recommendations on when it should be used by clients. Finally, Section 4 of this specifcation defines the "depth-noroot" preference that can be used with WebDAV [RFC4918] methods that support the "Depth" header field.. 1.1. Notational Conventions 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 references XML elements types in the "DAV:" namespace outside of the context of an XML fragment. When doing so, the string "DAV:" will be prepended to the XML element type. 2. Reducing WebDAV Response Verbosity with "return=minimal" Some payload bodies in responses to WebDAV [RFC4918] requests, such as 207 (Multi-Status) [RFC4918] responses, can be quite verbose or even unnecessary at times. This specification defines how the Prefer [I-D.snell-http-prefer] request header field, in conjunction with its "return=minimal" preference, can be used by clients to reduce the verbosity of such responses by requesting that the server omit those portions of the response that can be inferred by their absence. Murchison Expires November 18, 2013 [Page 3] Internet-Draft Prefer in WebDAV May 2013 2.1. Minimal PROPFIND Response When a PROPFIND [RFC4918] method request contains a Prefer [I-D.snell-http-prefer] header field with a preference of "return=minimal", the server SHOULD omit all DAV:propstat XML elements containing a DAV:status XML element of value 404 (Not Found) [I-D.ietf-httpbis-p2-semantics] from the 207 (Multi-Status) [RFC4918] response. If the omission of such a DAV:propstat element would result in a DAV:response XML element containing zero DAV:propstat elements, then the server MUST substitute a DAV:propstat element consisting of an empty DAV:prop element and a DAV:status element of value 200 (OK) [I-D.ietf-httpbis-p2-semantics] in its place. 2.1.1. Example: Typical PROPFIND request/response This example tries to fetch an unknown property from a CARDDAV:addressbook [RFC6352] collection. >> Request << PROPFIND /container/ HTTP/1.1 Host: carddav.example.com Content-Type: application/xml; charset=utf-8 Content-Length: xxxx >> Response << Murchison Expires November 18, 2013 [Page 4] Internet-Draft Prefer in WebDAV May 2013 HTTP/1.1 207 Multi-Status Content-Type: application/xml; charset=utf-8 Content-Length: xxxx Vary: Prefer /container/ HTTP/1.1 200 OK HTTP/1.1 404 Not Found 2.1.2. Example: Minimal PROPFIND request/response This example tries to fetch an unknown property from a CARDDAV:addressbook [RFC6352] collection. >> Request << Murchison Expires November 18, 2013 [Page 5] Internet-Draft Prefer in WebDAV May 2013 PROPFIND /container/ HTTP/1.1 Host: carddav.example.com Content-Type: application/xml; charset=utf-8 Content-Length: xxxx Prefer: return=minimal >> Response << HTTP/1.1 207 Multi-Status Content-Type: application/xml; charset=utf-8 Content-Length: xxxx Preference-Applied: return=minimal Vary: Prefer /container/ HTTP/1.1 200 OK 2.1.3. Example: Minimal PROPFIND request/response with an empty DAV:propstat element This example tries to fetch an unknown property from a CARDDAV:addressbook [RFC6352] collection. Murchison Expires November 18, 2013 [Page 6] Internet-Draft Prefer in WebDAV May 2013 >> Request << PROPFIND /container/ HTTP/1.1 Host: carddav.example.com Content-Type: application/xml; charset=utf-8 Content-Length: xxxx Prefer: return=minimal >> Response << HTTP/1.1 207 Multi-Status Content-Type: application/xml; charset=utf-8 Content-Length: xxxx Preference-Applied: return=minimal Vary: Prefer /container/ HTTP/1.1 200 OK 2.2. Minimal REPORT Response When a REPORT [RFC3253] method request, whose report type results in a 207 (Multi-Status) [RFC4918] response, contains a Prefer header field with a preference of "return=minimal", the server SHOULD omit all DAV:propstat XML elements containing a DAV:status XML element of value 404 (Not Found) [I-D.ietf-httpbis-p2-semantics] from the 207 (Multi-Status) [RFC4918] response. If the omission of such a Murchison Expires November 18, 2013 [Page 7] Internet-Draft Prefer in WebDAV May 2013 DAV:propstat element would result in a DAV:response XML element containing zero DAV:propstat elements, then the server MUST substitute a DAV:propstat element consisting of an empty DAV:prop element and a DAV:status element of value 200 (OK) [I-D.ietf-httpbis-p2-semantics] in its place. 2.2.1. Example: Typical REPORT request/response This example uses the CALDAV:calendar-multiget [RFC4791] REPORT type. >> Request << REPORT /murch/work/ HTTP/1.1 Host: caldav.example.com Content-Type: application/xml; charset=utf-8 Content-Length: xxxx /murch/work/abc.ics /murch/work/qrs.ics /murch/work/xyz.ics >> Response << Murchison Expires November 18, 2013 [Page 8] Internet-Draft Prefer in WebDAV May 2013 HTTP/1.1 207 Multi-Status Content-Type: application/xml; charset=utf-8 Content-Length: xxxx Vary: Prefer /murch/work/abc.ics "jahsd823ru" HTTP/1.1 200 OK HTTP/1.1 404 Not Found /murch/work/qrs.ics HTTP/1.1 404 Not Found /murch/work/xyz.ics "p08ulkj" HTTP/1.1 200 OK HTTP/1.1 404 Not Found 2.2.2. Example: Minimal REPORT request/response This example uses the CALDAV:calendar-multiget [RFC4791] REPORT type. Murchison Expires November 18, 2013 [Page 9] Internet-Draft Prefer in WebDAV May 2013 >> Request << REPORT /murch/work/ HTTP/1.1 Host: caldav.example.com Content-Type: application/xml; charset=utf-8 Content-Length: xxxx Prefer: return=minimal /murch/work/abc.ics /murch/work/qrs.ics /murch/work/xyz.ics >> Response << Murchison Expires November 18, 2013 [Page 10] Internet-Draft Prefer in WebDAV May 2013 HTTP/1.1 207 Multi-Status Content-Type: application/xml; charset=utf-8 Content-Length: xxxx Preference-Applied: return=minimal Vary: Prefer /murch/work/abc.ics "jahsd823ru" HTTP/1.1 200 OK /murch/work/qrs.ics HTTP/1.1 404 Not Found /murch/work/xyz.ics "p08ulkj" HTTP/1.1 200 OK 2.3. Minimal PROPPATCH Response When a PROPPATCH [RFC4918] request contains a Prefer [I-D.snell-http-prefer] header field with a preference of "return=minimal", and all instructions are processed successfully, the server SHOULD return a 200 (OK) [I-D.ietf-httpbis-p2-semantics] response with an empty (zero-length) message body instead of a 207 (Multi-Status) [RFC4918] response. 2.3.1. Example: Typical PROPPATCH request/response >> Request << Murchison Expires November 18, 2013 [Page 11] Internet-Draft Prefer in WebDAV May 2013 PROPPATCH /container/ HTTP/1.1 Host: webdav.example.com Content-Type: application/xml; charset=utf-8 Content-Length: xxxx My Container >> Response << HTTP/1.1 207 Multi-Status Content-Type: application/xml; charset=utf-8 Content-Length: xxxx /container/ HTTP/1.1 200 OK 2.3.2. Example: Minimal PROPPATCH request/response >> Request << Murchison Expires November 18, 2013 [Page 12] Internet-Draft Prefer in WebDAV May 2013 PROPPATCH /container/ HTTP/1.1 Host: webdav.example.com Content-Type: application/xml; charset=utf-8 Content-Length: xxxx Prefer: return=minimal My Container >> Response << HTTP/1.1 200 OK Content-Length: 0 Preference-Applied: return=minimal 2.4. Minimal MKCALENDAR / MKCOL Response Both the MKCALENDAR [RFC4791] and Extended MKCOL [RFC5689] specifications indicate that a server MAY return a message body in response to a successful request. This specification explicitly defines the intended behavior in the presence of the Prefer [I-D.snell-http-prefer] header field. When a MKCALENDAR or an Extended MKCOL request contains a Prefer header field with a preference of "return=minimal", and the collection is created with all requested properties being set successfully, the server SHOULD return a 201 (Created) [I-D.ietf-httpbis-p2-semantics] response with an empty (zero-length) message body. 2.4.1. Example: Verbose MKCOL request/response >> Request << Murchison Expires November 18, 2013 [Page 13] Internet-Draft Prefer in WebDAV May 2013 MKCOL /container/ HTTP/1.1 Host: webdav.example.com Content-Type: application/xml; charset=utf-8 Content-Length: xxxx My Container >> Response << HTTP/1.1 201 Created Cache-Control: no-cache Content-Type: application/xml; charset=utf-8 Content-Length: xxxx HTTP/1.1 200 OK 2.4.2. Example: Minimal MKCOL request/response >> Request << Murchison Expires November 18, 2013 [Page 14] Internet-Draft Prefer in WebDAV May 2013 MKCOL /container/ HTTP/1.1 Host: webdav.example.com Content-Type: application/xml; charset=utf-8 Content-Length: xxxx Prefer: return=minimal My Container >> Response << HTTP/1.1 201 Created Cache-Control: no-cache Content-Length: 0 Preference-Applied: return=minimal 3. Reducing WebDAV Round-Trips with "return=representation" The PUT, COPY, MOVE, [RFC4918] and POST [RFC5995] methods can be used to create or update a resource. In some instances, such as with CalDAV Scheduling [RFC6638], the created or updated resource representation may differ from the representation sent in the body of the request or referenced by the effective request URI. In cases where the client would normally issue a subsquent GET request to retrieve the current representation of the resource, the client SHOULD instead include a Prefer header field with the "return=representation" preference in the PUT, COPY, MOVE, or POST request. By doing this, the client can coalesce the create/update and retrieve operations into one round-trip rather than two. An additional benefit of using "return=representation" in such a request is that the client will know that any changes to the resource were produced by the server rather than a concurrent client, thus providing a level of atomicity to the operation. 3.1. Example: Typical resource creation and retrieval via POST + GET Murchison Expires November 18, 2013 [Page 15] Internet-Draft Prefer in WebDAV May 2013 >> Request << POST /murch/work;add-member/ HTTP/1.1 Host: caldav.example.com Content-Type: text/calendar; charset=utf-8 Content-Length: xxxx BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example Corp.//CalDAV Client//EN BEGIN:VEVENT UID:CD87465FA SEQUENCE:0 DTSTAMP:20120602T185254Z DTSTART:20120602T160000Z DTEND:20120602T170000Z TRANSP:OPAQUE SUMMARY:Lunch ORGANIZER;CN="Ken Murchison":mailto:murch@example.com ATTENDEE;CN="Ken Murchison";CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED: mailto:murch@example.com ATTENDEE;CN="John Doe";CUTYPE=INDIVIDUAL;PARTSTAT =NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:mailto:jdoe@ example.com END:VEVENT END:VCALENDAR >> Response << HTTP/1.1 201 Created Location: /murch/work/abc.ics Content-Length: 0 ETag: "nahduyejc" Schedule-Tag: "jfd84hgbcn" >> Request << Murchison Expires November 18, 2013 [Page 16] Internet-Draft Prefer in WebDAV May 2013 GET /murch/work/abc.ics HTTP/1.1 Host: caldav.example.com >> Response << HTTP/1.1 200 OK Content-Type: text/calendar; charset=utf-8 Content-Length: xxxx ETag: "nahduyejc" Schedule-Tag: "jfd84hgbcn" BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example Corp.//CalDAV Server//EN BEGIN:VEVENT UID:CD87465FA SEQUENCE:0 DTSTAMP:20120602T185300Z DTSTART:20120602T160000Z DTEND:20120602T170000Z TRANSP:OPAQUE SUMMARY:Lunch ORGANIZER;CN="Ken Murchison":mailto:murch@example.com ATTENDEE;CN="Ken Murchison";CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED: mailto:murch@example.com ATTENDEE;CN="John Doe";CUTYPE=INDIVIDUAL;PARTSTAT =NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE;SCHEDULE-STATUS= 1.2:mailto:jdoe@example.com END:VEVENT END:VCALENDAR 3.2. Example: Streamlined resource creation and retrieval via POST >> Request << Murchison Expires November 18, 2013 [Page 17] Internet-Draft Prefer in WebDAV May 2013 POST /murch/work;add-member/ HTTP/1.1 Host: caldav.example.com Content-Type: text/calendar; charset=utf-8 Content-Length: xxxx Prefer: return=representation BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example Corp.//CalDAV Client//EN BEGIN:VEVENT UID:CD87465FA SEQUENCE:0 DTSTAMP:20120602T185254Z DTSTART:20120602T160000Z DTEND:20120602T170000Z TRANSP:OPAQUE SUMMARY:Lunch ORGANIZER;CN="Ken Murchison":mailto:murch@example.com ATTENDEE;CN="Ken Murchison";CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED: mailto:murch@example.com ATTENDEE;CN="John Doe";CUTYPE=INDIVIDUAL;PARTSTAT =NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:mailto:jdoe@ example.com END:VEVENT END:VCALENDAR >> Response << Murchison Expires November 18, 2013 [Page 18] Internet-Draft Prefer in WebDAV May 2013 HTTP/1.1 201 Created Location: /murch/work/abc.ics Content-Type: text/calendar; charset=utf-8 Content-Length: xxxx Content-Location: /murch/work/abc.ics ETag: "nahduyejc" Schedule-Tag: "jfd84hgbcn" Preference-Applied: return=representation BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Example Corp.//CalDAV Server//EN BEGIN:VEVENT UID:CD87465FA SEQUENCE:0 DTSTAMP:20120602T185300Z DTSTART:20120602T160000Z DTEND:20120602T170000Z TRANSP:OPAQUE SUMMARY:Lunch ORGANIZER;CN="Ken Murchison":mailto:murch@example.com ATTENDEE;CN="Ken Murchison";CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED: mailto:murch@example.com ATTENDEE;CN="John Doe";CUTYPE=INDIVIDUAL;PARTSTAT =NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE;SCHEDULE-STATUS= 1.2:mailto:jdoe@example.com END:VEVENT END:VCALENDAR 4. The "depth-noroot" Processing Preference The "depth-noroot" preference indicates that the client wishes for the server to exclude the target (root) resource from processing by the WebDAV method and only apply the WebDAV method to the target resource's subordinate resources. depth-noroot = "depth-noroot" This preference is only intended to be used with WebDAV methods whose definitions explicitly provide support for the Depth [RFC4918] header field. Furthermore, this preference only applies when the Depth header field has a value of "1" or "infinity" (either implicitly or explicitly). Murchison Expires November 18, 2013 [Page 19] Internet-Draft Prefer in WebDAV May 2013 The "depth-noroot" preference MAY be used in conjunction with the "return=minimal" preference in a single request. 4.1. Example: Typical PROPFIND request/response with Depth:1 This example fetches the DAV:sync-token [RFC6578] property for a collection and its child collections. >> Request << PROPFIND /murch/ HTTP/1.1 Host: dav.example.com Content-Type: text/xml Content-Length: xxx Depth: 1 >> Response << Murchison Expires November 18, 2013 [Page 20] Internet-Draft Prefer in WebDAV May 2013 HTTP/1.1 207 Multi-Status Content-Type: application/xml; charset=utf-8 Content-Length: xxxx /murch/ http://example.com/ns/sync/2216-2 HTTP/1.1 200 OK /murch/work/ http://example.com/ns/sync/2136-34 HTTP/1.1 200 OK /murch/home/ http://example.com/ns/sync/2141-19 HTTP/1.1 200 OK 4.2. Example: PROPFIND request/response with Depth:1 and Prefer:depth- noroot This example fetches the DAV:sync-token [RFC6578] property for just the child collections. >> Request << Murchison Expires November 18, 2013 [Page 21] Internet-Draft Prefer in WebDAV May 2013 PROPFIND /murch/ HTTP/1.1 Host: dav.example.com Content-Type: text/xml Content-Length: xxx Depth: 1 Prefer: depth-noroot >> Response << HTTP/1.1 207 Multi-Status Content-Type: application/xml; charset=utf-8 Content-Length: xxxx Preference-Applied: depth-noroot Vary: Prefer /murch/work/ http://example.com/ns/sync/2136-34 HTTP/1.1 200 OK /murch/home/ http://example.com/ns/sync/2141-19 HTTP/1.1 200 OK Murchison Expires November 18, 2013 [Page 22] Internet-Draft Prefer in WebDAV May 2013 5. Implementation Status [RFC Editor: before publication please remove this section and the reference to [I-D.sheffer-running-code]] This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in [I-D.sheffer-running-code]. According to [I-D.sheffer-running-code], "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, by considering the running code as evidence of valuable experimentation and feedback that has made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit". 5.1. Cyrus The open source Cyrus [1] project is a highly scalable enterprise mail system which also supports calendaring and contacts. This beta level CalDAV/CardDAV implementation supports all of the preferences described in this document and successfully interoperates with the CalDAVTester client implementation described below. This implementation is freely distributable under a BSD style license from Computing Services at Carnegie Mellon University [2]. 5.2. Calendar and Contacts Server The open source Calendar and Contacts Server [3] project is a standards-compliant server implementing the CalDAV and CardDAV protocols. This production level implementation supports all of the preferences described in this document and successfully interoperates with the CalDAVTester client implementation described below. This implementation is freely distributable under the terms of the Apache License, Version 2.0 [4]. 5.3. Bedework Bedework [5] is an open-source enterprise calendar system that supports public, personal, and group calendaring. This production level implementation supports the "return=minimal" preference described in this document and successfully interoperates with the CalDAVTester client implementation described below. This implementation is freely distributable under the Jasig Licensing Policy [6]. 5.4. DAViCal Murchison Expires November 18, 2013 [Page 23] Internet-Draft Prefer in WebDAV May 2013 DAViCal [7] is a server for calendar sharing using the CalDAV protocol. This production level implementation supports the "return=minimal" preference described in this document and successfully interoperates with the CalDAVTester client implementation described below. This implementation is Free Software [8] distributable under the General Public License [9]. 5.5. CalDAVTester CalDAVTester [10] is an open source test and performance application designed to work with CalDAV and/or CardDAV servers and tests various aspects of their protocol handling as well as performance. This widely used implementation supports all of the preferences described in this document and successfully interoperates with the server implementations described above. This implementation is freely distributable under the terms of the Apache License, Version 2.0 [11]. 6. Security Considerations No new security considerations are introduced by use of the Prefer header field with WebDAV request methods, beyond those discussed in [I-D.snell-http-prefer] and those already inherent in those methods. 7. IANA Considerations The following preference is to be added to the Preferences Registry defined in [I-D.snell-http-prefer]. o Preference: depth-noroot o Description: The "depth-noroot" preference indicates that the client wishes for the server to exclude the target (root) resource from processing by the WebDAV method and only apply the WebDAV method to the target resource's subordinate resources. o Reference: Section 4 o Notes: This preference is only intended to be used with WebDAV methods whose definitions explicitly provide support for the "Depth" [RFC4918] header field. Furthermore, this preference only applies when the "Depth" header field has a value of "1" or "infinity" (either implicitly or explicitly). 8. Acknowledgements Murchison Expires November 18, 2013 [Page 24] Internet-Draft Prefer in WebDAV May 2013 The author would like to thank the following individuals for contributing their ideas and support for writing this specification: Cyrus Daboo, Helge Hess, Andrew McMillan, and Arnaud Quillaud. The author would also like to thank the Calendaring and Scheduling Consortium for advice with this specification, and for organizing interoperability testing events to help refine it. 9. References 9.1. Normative References [I-D.ietf-httpbis-p2-semantics] Fielding, R. and J. Reschke, "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", draft-ietf- httpbis-p2-semantics-22 (work in progress), February 2013. [I-D.snell-http-prefer] Snell, J., "Prefer Header for HTTP", draft-snell-http- prefer-18 (work in progress), January 2013. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J. Whitehead, "Versioning Extensions to WebDAV (Web Distributed Authoring and Versioning)", RFC 3253, March 2002. [RFC4791] Daboo, C., Desruisseaux, B., and L.M. 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. [RFC5689] Daboo, C., "Extended MKCOL for Web Distributed Authoring and Versioning (WebDAV)", RFC 5689, September 2009. [RFC5995] Reschke, J., "Using POST to Add Members to Web Distributed Authoring and Versioning (WebDAV) Collections", RFC 5995, September 2010. Murchison Expires November 18, 2013 [Page 25] Internet-Draft Prefer in WebDAV May 2013 9.2. Informative References [I-D.sheffer-running-code] Sheffer, Y. and A. Farrel, "Improving Awareness of Running Code: the Implementation Status Section", draft-sheffer- running-code-04 (work in progress), April 2013. [MSDN.aa493854] Microsoft Developer Network, "PROPPATCH Method", June 2006. [MSDN.aa563501] Microsoft Developer Network, "Brief Header", June 2006. [MSDN.aa563950] Microsoft Developer Network, "Depth Header", June 2006. [MSDN.aa580336] Microsoft Developer Network, "PROPFIND Method", June 2006. [RFC6352] Daboo, C., "CardDAV: vCard Extensions to Web Distributed Authoring and Versioning (WebDAV)", RFC 6352, August 2011. [RFC6578] Daboo, C. and A. Quillaud, "Collection Synchronization for Web Distributed Authoring and Versioning (WebDAV)", RFC 6578, March 2012. [RFC6638] Daboo, C. and B. Desruisseaux, "Scheduling Extensions to CalDAV", RFC 6638, June 2012. Appendix A. The Brief and Extended Depth Request Header Fields This document is based heavily on the Brief [MSDN.aa563501] and extended Depth [MSDN.aa563950] request header fields. The behaviors described in Section 2.1 and Section 2.3 are identical to those provided by the Brief header field when used with the PROPFIND [MSDN.aa580336] and PROPPATCH [MSDN.aa493854] methods respectively. The behavior described in Section 4 is identical to that provided by the "1,noroot" [MSDN.aa563950] and "infinity,noroot" [MSDN.aa563950] Depth header field values. Authors are encouraged to implement the Brief header field functionality in conjunction with this specification to further promote interoperability with products that use the Brief header field exclusively. Appendix B. Open Issues Murchison Expires November 18, 2013 [Page 26] Internet-Draft Prefer in WebDAV May 2013 o Do we need a "depth-root" option for use with DAV:sync- level=infinity? Or is this best addressed with an extension to [RFC6578]? o Is the Vary header field necesary in the PROPFIND/REPORT responses? Are PROPFIND/REPORT results ever cached? o Does this specification actually update RFC 3253, 4791, 4918, 5689, 5995? The original thought was yes because this draft updates/alters the behavior of the HTTP methods contained in those specs. However, the base Prefer draft doesn't state that it updates RFC 2616 or HTTPbis. Appendix C. Change Log [RFC Editor: before publication please remove this section] C.1. Since -02 o Reintroduced "Updates" to header. o Added text noting that "return=representation" provides a level of atomicity to the operation. o Added "Implementation Status" section. o Tweaked/corrected some examples.. o Updated HTTPbis references. C.2. Since -01 o Removed "Updates" from header. o Fixed some missing/incorrect references. o Reintroduced Cache-Control:no-cache to MKCOL responses. C.3. Since -00 o Updated to comply with draft-snell-httpprefer-18. o Reordered "Minimal REPORT Response" and "Minimal PROPPATCH Response" sections. o Added some explanatory text to examples. Murchison Expires November 18, 2013 [Page 27] Internet-Draft Prefer in WebDAV May 2013 C.4. Since CalConnect XXIV o Updated references. o Stated that "depth-noroot" can be used in conjuction with "return=minimal". o Added text mentioning that "depth-noroot" is based on the MSDN "1,noroot" and "infinity,noroot" Depth header values. o The server behavior required when "return=minimal" would result in zero DAV:propstat elements has been changed from: /container/ HTTP/1.1 200 OK to the slightly more verbose: /container/ HTTP/1.1 200 OK Author's Address Murchison Expires November 18, 2013 [Page 28] Internet-Draft Prefer in WebDAV May 2013 Kenneth Murchison Carnegie Mellon University 5000 Forbes Avenue Pittsburgh, PA 15213 US Email: murch@andrew.cmu.edu Murchison Expires November 18, 2013 [Page 29]