draft-ietf-webdav-rfc2518bis-06.txt   draft-ietf-webdav-rfc2518bis-07.txt 
©Ą
WebDAV L. Dusseault WebDAV L. Dusseault
Internet-Draft OSAF Internet-Draft OSAF
Expires: January 15, 2005 J. Crawford Expires: January 16, 2006 J. Crawford
IBM IBM
July 17, 2004 July 15, 2005
HTTP Extensions for Distributed Authoring - WebDAV RFC2518 bis HTTP Extensions for Distributed Authoring - WebDAV RFC2518 bis
draft-ietf-webdav-rfc2518bis-06 draft-ietf-webdav-rfc2518bis-07
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with By submitting this Internet-Draft, each author represents that any
all provisions of Section 10 of RFC2026. applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as other groups may also distribute working documents as Internet-
Internet-Drafts. Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at http:// The list of current Internet-Drafts can be accessed at
www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on January 15, 2005. This Internet-Draft will expire on January 16, 2006.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2004). All Rights Reserved. Copyright (C) The Internet Society (2005).
Abstract Abstract
WebDAV consists of a set of methods, headers, and content-types WebDAV consists of a set of methods, headers, and content-types
ancillary to HTTP/1.1 for the management of resource properties, ancillary to HTTP/1.1 for the management of resource properties,
creation and management of resource collections, namespace creation and management of resource collections, namespace
manipulation, and resource locking (collision avoidance). manipulation, and resource locking (collision avoidance).
RFC2518 was published in February 1998, and this draft makes minor RFC2518 was published in February 1998, and this draft makes minor
revisions mostly due to interoperability experience. revisions mostly due to interoperability experience.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 7
2. Notational Conventions . . . . . . . . . . . . . . . . . . . 9
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . 10
4. Data Model for Resource Properties . . . . . . . . . . . . . 11
4.1 The Resource Property Model . . . . . . . . . . . . . . 11
4.2 Properties and HTTP Headers . . . . . . . . . . . . . . 11
4.3 XML Usage . . . . . . . . . . . . . . . . . . . . . . . 11
4.4 Property Values . . . . . . . . . . . . . . . . . . . . 12
4.5 Property Names . . . . . . . . . . . . . . . . . . . . . 13
4.6 Source Resources and Output Resources . . . . . . . . . 14
5. Collections of Web Resources . . . . . . . . . . . . . . . . 15
5.1 HTTP URL Namespace Model . . . . . . . . . . . . . . . . 15
5.2 Collection Resources . . . . . . . . . . . . . . . . . . 15
6. Locking . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.1 Exclusive Vs. Shared Locks . . . . . . . . . . . . . . . 17
6.2 Required Support . . . . . . . . . . . . . . . . . . . . 18
6.3 Lock Tokens . . . . . . . . . . . . . . . . . . . . . . 18
6.4 Lock Token URI Schemes . . . . . . . . . . . . . . . . . 19
6.5 Lock Capability Discovery . . . . . . . . . . . . . . . 19
6.6 Active Lock Discovery . . . . . . . . . . . . . . . . . 20
6.7 Locks and Multiple Bindings . . . . . . . . . . . . . . 20
7. Write Lock . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.1 Lock Owner . . . . . . . . . . . . . . . . . . . . . . . 21
7.2 Methods Restricted by Write Locks . . . . . . . . . . . 21
7.3 Write Locks and Lock Tokens . . . . . . . . . . . . . . 22
7.4 Write Locks and Properties . . . . . . . . . . . . . . . 22
7.5 Avoiding Lost Updates . . . . . . . . . . . . . . . . . 22
7.6 Write Locks and Unmapped URLs . . . . . . . . . . . . . 23
7.7 Write Locks and Collections . . . . . . . . . . . . . . 25
7.8 Write Locks and the If Request Header . . . . . . . . . 26
7.9 Write Locks and COPY/MOVE . . . . . . . . . . . . . . . 27
7.10 Refreshing Write Locks . . . . . . . . . . . . . . . . . 28
8. HTTP Methods for Distributed Authoring . . . . . . . . . . . 29
8.1 General request and response handling . . . . . . . . . 29
8.1.1 Use of XML . . . . . . . . . . . . . . . . . . . . . 29
8.1.2 Required Bodies in Requests . . . . . . . . . . . . 29
8.1.3 Use of Location header in responses . . . . . . . . 29
8.1.4 Required Response Headers: Date . . . . . . . . . . 29
8.1.5 ETag . . . . . . . . . . . . . . . . . . . . . . . . 29
8.1.6 Including error response bodies . . . . . . . . . . 30
8.2 PROPFIND . . . . . . . . . . . . . . . . . . . . . . . . 31
8.2.1 Example - Retrieving Named Properties . . . . . . . 33
8.2.2 Example - Retrieving Named and Dead Properties . . . 35
8.2.3 Example - Using propname to Retrieve all Property
Names . . . . . . . . . . . . . . . . . . . . . . . 35
8.2.4 PROPFIND Request Errors . . . . . . . . . . . . . . 37
8.3 PROPPATCH . . . . . . . . . . . . . . . . . . . . . . . 37
8.3.1 Status Codes for use with 207 (Multi-Status) . . . . 37
8.3.2 Example - PROPPATCH . . . . . . . . . . . . . . . . 39
8.4 MKCOL Method . . . . . . . . . . . . . . . . . . . . . . 40
8.4.1 MKCOL Status Codes . . . . . . . . . . . . . . . . . 40
8.4.2 Example - MKCOL . . . . . . . . . . . . . . . . . . 41
8.5 GET, HEAD for Collections . . . . . . . . . . . . . . . 41
8.6 POST for Collections . . . . . . . . . . . . . . . . . . 42
8.7 DELETE . . . . . . . . . . . . . . . . . . . . . . . . . 42
8.7.1 DELETE for Non-Collection Resources . . . . . . . . 42
8.7.2 DELETE for Collections . . . . . . . . . . . . . . . 42
8.7.3 Example - DELETE . . . . . . . . . . . . . . . . . . 43
8.8 PUT . . . . . . . . . . . . . . . . . . . . . . . . . . 43
8.8.1 PUT for Non-Collection Resources . . . . . . . . . . 43
8.8.2 PUT for Collections . . . . . . . . . . . . . . . . 44
8.9 COPY . . . . . . . . . . . . . . . . . . . . . . . . . . 44
8.9.1 COPY for Non-collection Resources . . . . . . . . . 44
8.9.2 COPY for Properties . . . . . . . . . . . . . . . . 45
8.9.3 COPY for Collections . . . . . . . . . . . . . . . . 45
8.9.4 COPY and the Overwrite Header . . . . . . . . . . . 46
8.9.5 Status Codes . . . . . . . . . . . . . . . . . . . . 47
8.9.6 COPY Examples . . . . . . . . . . . . . . . . . . . 47
8.10 MOVE . . . . . . . . . . . . . . . . . . . . . . . . . . 49
8.10.1 MOVE for Properties . . . . . . . . . . . . . . . . 50
8.10.2 MOVE for Collections . . . . . . . . . . . . . . . . 50
8.10.3 MOVE and the Overwrite Header . . . . . . . . . . . 51
8.10.4 Status Codes . . . . . . . . . . . . . . . . . . . . 51
8.10.5 Examples . . . . . . . . . . . . . . . . . . . . . . 52
8.11 LOCK Method . . . . . . . . . . . . . . . . . . . . . . 53
8.11.1 Refreshing Locks . . . . . . . . . . . . . . . . . . 54
8.11.2 Depth and Locking . . . . . . . . . . . . . . . . . 55
8.11.3 Locking Unmapped URLs . . . . . . . . . . . . . . . 55
8.11.4 Lock Compatibility Table . . . . . . . . . . . . . . 56
8.11.5 LOCK responses . . . . . . . . . . . . . . . . . . . 56
8.11.6 Example - Simple Lock Request . . . . . . . . . . . 57
8.11.7 Example - Refreshing a Write Lock . . . . . . . . . 59
8.11.8 Example - Multi-Resource Lock Request . . . . . . . 60
8.12 UNLOCK Method . . . . . . . . . . . . . . . . . . . . . 61
8.12.1 Status Codes . . . . . . . . . . . . . . . . . . . . 61
8.12.2 Example . . . . . . . . . . . . . . . . . . . . . . 62
9. HTTP Headers for Distributed Authoring . . . . . . . . . . . 63
9.1 DAV Header . . . . . . . . . . . . . . . . . . . . . . . 63
9.2 Depth Header . . . . . . . . . . . . . . . . . . . . . . 63
9.3 Destination Header . . . . . . . . . . . . . . . . . . . 65
9.4 Force-Authentication Header . . . . . . . . . . . . . . 65
9.5 If Header . . . . . . . . . . . . . . . . . . . . . . . 65
9.5.1 No-tag-list Production . . . . . . . . . . . . . . . 66
9.5.2 Tagged-list Production . . . . . . . . . . . . . . . 67
9.5.3 Not Production . . . . . . . . . . . . . . . . . . . 67
9.5.4 Matching Function . . . . . . . . . . . . . . . . . 68
9.5.5 If Header and Non-DAV Aware Proxies . . . . . . . . 69
9.6 Lock-Token Header . . . . . . . . . . . . . . . . . . . 69
9.7 Overwrite Header . . . . . . . . . . . . . . . . . . . . 69
9.8 Timeout Request Header . . . . . . . . . . . . . . . . . 69
10. Status Code Extensions to HTTP/1.1 . . . . . . . . . . . . 71
10.1 102 Processing . . . . . . . . . . . . . . . . . . . . . 71
10.2 207 Multi-Status . . . . . . . . . . . . . . . . . . . . 71
10.3 422 Unprocessable Entity . . . . . . . . . . . . . . . . 71
10.4 423 Locked . . . . . . . . . . . . . . . . . . . . . . . 71
10.5 424 Failed Dependency . . . . . . . . . . . . . . . . . 72
10.6 507 Insufficient Storage . . . . . . . . . . . . . . . . 72
11. Use of HTTP Status Codes . . . . . . . . . . . . . . . . . 73
11.1 301 Moved Permanently . . . . . . . . . . . . . . . . . 73
11.2 302 Found . . . . . . . . . . . . . . . . . . . . . . . 73
11.3 400 Bad Request . . . . . . . . . . . . . . . . . . . . 73
11.4 403 Forbidden . . . . . . . . . . . . . . . . . . . . . 73
11.5 409 Conflict . . . . . . . . . . . . . . . . . . . . . . 73
11.6 412 Precondition Failed . . . . . . . . . . . . . . . . 73
11.7 414 Request-URI Too Long . . . . . . . . . . . . . . . . 74
11.8 503 Service Unavailable . . . . . . . . . . . . . . . . 74
12. Multi-Status Response . . . . . . . . . . . . . . . . . . 75
12.1 Responses requiring Location in Multi-Status . . . . . . 75
13. XML Element Definitions . . . . . . . . . . . . . . . . . 77
13.1 activelock XML Element . . . . . . . . . . . . . . . . . 77
13.2 depth XML Element . . . . . . . . . . . . . . . . . . . 77
13.3 locktoken XML Element . . . . . . . . . . . . . . . . . 77
13.4 lockroot XML Element . . . . . . . . . . . . . . . . . . 78
13.5 timeout XML Element . . . . . . . . . . . . . . . . . . 78
13.6 collection XML Element . . . . . . . . . . . . . . . . . 79
13.7 href XML Element . . . . . . . . . . . . . . . . . . . . 79
13.8 lockentry XML Element . . . . . . . . . . . . . . . . . 79
13.9 lockinfo XML Element . . . . . . . . . . . . . . . . . . 80
13.10 lockscope XML Element . . . . . . . . . . . . . . . . 80
13.11 exclusive XML Element . . . . . . . . . . . . . . . . 80
13.12 shared XML Element . . . . . . . . . . . . . . . . . . 81
13.13 locktype XML Element . . . . . . . . . . . . . . . . . 81
13.14 write XML Element . . . . . . . . . . . . . . . . . . 82
13.15 multistatus XML Element . . . . . . . . . . . . . . . 82
13.16 response XML Element . . . . . . . . . . . . . . . . . 82
13.17 propstat XML Element . . . . . . . . . . . . . . . . . 83
13.18 status XML Element . . . . . . . . . . . . . . . . . . 83
13.19 responsedescription XML Element . . . . . . . . . . . 84
13.20 owner XML Element . . . . . . . . . . . . . . . . . . 84
13.21 prop XML element . . . . . . . . . . . . . . . . . . . 85
13.22 propertyupdate XML element . . . . . . . . . . . . . . 85
13.23 remove XML element . . . . . . . . . . . . . . . . . . 85
13.24 set XML element . . . . . . . . . . . . . . . . . . . 86
13.25 propfind XML Element . . . . . . . . . . . . . . . . . 86
13.26 allprop XML Element . . . . . . . . . . . . . . . . . 87
13.27 propname XML Element . . . . . . . . . . . . . . . . . 87
13.28 dead-props XML Element . . . . . . . . . . . . . . . . 87
13.29 location XML Element . . . . . . . . . . . . . . . . . 88
13.30 error XML Element . . . . . . . . . . . . . . . . . . 88
14. DAV Properties . . . . . . . . . . . . . . . . . . . . . . 89
14.1 creationdate Property . . . . . . . . . . . . . . . . . 89
14.2 displayname Property . . . . . . . . . . . . . . . . . . 90
14.3 getcontentlanguage Property . . . . . . . . . . . . . . 90
14.4 getcontentlength Property . . . . . . . . . . . . . . . 91
14.5 getcontenttype Property . . . . . . . . . . . . . . . . 91
14.6 getetag Property . . . . . . . . . . . . . . . . . . . . 92
14.7 getlastmodified Property . . . . . . . . . . . . . . . . 93
14.8 lockdiscovery Property . . . . . . . . . . . . . . . . . 94
14.8.1 Example - Retrieving the lockdiscovery Property . . 94
14.9 resourcetype Property . . . . . . . . . . . . . . . . . 96
14.10 supportedlock Property . . . . . . . . . . . . . . . . 96
14.10.1 Example - Retrieving the supportedlock Property . 98
15. Precondition/postcondition XML elements . . . . . . . . . 99
16. Instructions for Processing XML in DAV . . . . . . . . . . 102
17. DAV Compliance Classes . . . . . . . . . . . . . . . . . . 103
17.1 Class 1 . . . . . . . . . . . . . . . . . . . . . . . . 103
17.2 Class 2 . . . . . . . . . . . . . . . . . . . . . . . . 103
17.3 Class 'bis' . . . . . . . . . . . . . . . . . . . . . . 103
18. Internationalization Considerations . . . . . . . . . . . 105
19. Security Considerations . . . . . . . . . . . . . . . . . 107
19.1 Authentication of Clients . . . . . . . . . . . . . . . 107
19.2 Denial of Service . . . . . . . . . . . . . . . . . . . 107
19.3 Security through Obscurity . . . . . . . . . . . . . . . 108
19.4 Privacy Issues Connected to Locks . . . . . . . . . . . 108
19.5 Privacy Issues Connected to Properties . . . . . . . . . 108
19.6 Implications of XML External Entities . . . . . . . . . 109
19.7 Risks Connected with Lock Tokens . . . . . . . . . . . . 109
20. IANA Considerations . . . . . . . . . . . . . . . . . . . 111
21. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 112
22. References . . . . . . . . . . . . . . . . . . . . . . . . 113
22.1 Normative References . . . . . . . . . . . . . . . . . . 113
22.2 Informational References . . . . . . . . . . . . . . . . 113
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 114
A. Previous Authors' Addresses . . . . . . . . . . . . . . . . 115
B. Appendices . . . . . . . . . . . . . . . . . . . . . . . . . 116
B.1 Appendix 1 - Notes on Processing XML Elements . . . . . 116
B.1.1 Notes on Empty XML Elements . . . . . . . . . . . . 116
B.1.2 Notes on Illegal XML Processing . . . . . . . . . . 116
B.1.3 Example - XML Syntax Error . . . . . . . . . . . . . 116
B.1.4 Example - Unknown XML Element . . . . . . . . . . . 117
B.2 Appendix 3: Notes on HTTP Client Compatibility . . . . . 118
B.3 Changes . . . . . . . . . . . . . . . . . . . . . . . . 119
B.3.1 Changes in -06 . . . . . . . . . . . . . . . . . . . 119
B.3.2 Changes in -07 . . . . . . . . . . . . . . . . . . . 119
Intellectual Property and Copyright Statements . . . . . . . 121
1. Introduction 1. Introduction
This document describes an extension to the HTTP/1.1 protocol that This document describes an extension to the HTTP/1.1 protocol that
allows clients to perform remote web content authoring operations. allows clients to perform remote web content authoring operations.
This extension provides a coherent set of methods, headers, request This extension provides a coherent set of methods, headers, request
entity body formats, and response entity body formats that provide entity body formats, and response entity body formats that provide
operations for: operations for:
Properties: The ability to create, remove, and query information Properties: The ability to create, remove, and query information
about Web pages, such as their authors, creation dates, etc. Also, about Web pages, such as their authors, creation dates, etc. Also,
skipping to change at page 2, line 31 skipping to change at page 7, line 31
Locking: The ability to keep more than one person from working on a Locking: The ability to keep more than one person from working on a
document at the same time. This prevents the "lost update problem", document at the same time. This prevents the "lost update problem",
in which modifications are lost as first one author then another in which modifications are lost as first one author then another
writes changes without merging the other author's changes. writes changes without merging the other author's changes.
Namespace Operations: The ability to instruct the server to copy and Namespace Operations: The ability to instruct the server to copy and
move Web resources. move Web resources.
Requirements and rationale for these operations are described in a Requirements and rationale for these operations are described in a
companion document, "Requirements for a Distributed Authoring and companion document, "Requirements for a Distributed Authoring and
Versioning Protocol for the World Wide Web" (RFC2291) [15]. Versioning Protocol for the World Wide Web" (RFC2291) [12].
This standard does not specify the versioning operations suggested by This standard does not specify the versioning operations suggested by
RFC2291 [15]. That work was done in a separate document, "Versioning RFC2291 [12]. That work was done in a separate document, "Versioning
Extensions to WebDAV" (RFC3253) [18]. Extensions to WebDAV" (RFC3253) [14].
The sections below provide a detailed introduction to resource The sections below provide a detailed introduction to resource
properties (Section 4), collections of resources (Section 5), and properties (Section 4), collections of resources (Section 5), and
locking operations (Section 6). These sections introduce the locking operations (Section 6). These sections introduce the
abstractions manipulated by the WebDAV-specific HTTP methods (Section abstractions manipulated by the WebDAV-specific HTTP methods
8) and the new HTTP headers used with WebDAV methods (Section 9). (Section 8) and the new HTTP headers used with WebDAV methods
(Section 9).
While the status codes provided by HTTP/1.1 are sufficient to While the status codes provided by HTTP/1.1 are sufficient to
describe most error conditions encountered by WebDAV methods, there describe most error conditions encountered by WebDAV methods, there
are some errors that do not fall neatly into the existing categories. are some errors that do not fall neatly into the existing categories.
This specification defines new status codes developed for WebDAV This specification defines new status codes developed for WebDAV
methods (Section 10) and describes existing HTTP status codes methods (Section 10) and describes existing HTTP status codes
(Section 11) as used in WebDAV. Since some WebDAV methods may (Section 11) as used in WebDAV. Since some WebDAV methods may
operate over many resources, the Multi-Status response (Section 12) operate over many resources, the Multi-Status response (Section 12)
has been introduced to return status information for multiple has been introduced to return status information for multiple
resources. Finally, this version of WebDAV introduces XML elements resources. Finally, this version of WebDAV introduces XML elements
in error response bodies in Section 15. in error response bodies in Section 15.
WebDAV uses XML [11] to marshal complicated request and response WebDAV uses XML [11] to marshal complicated request and response
information, as well as to express metadata, so this specification information, as well as to express metadata, so this specification
contains definitions of all XML elements used (Section 13). WebDAV contains definitions of all XML elements used (Section 13). WebDAV
includes a few special rules on how to process XML (Section 16) includes a few special rules on how to process XML (Section 16)
appearing in WebDAV so that it truly is extensible. appearing in WebDAV so that it truly is extensible.
WebDAV employs the property mechanism to store information about the Finishing off the specification are sections on what it means for a
current state of the resource. For example, when a lock is taken out resource to be compliant with this specification (Section 17), on
on a resource, a lock information property describes the current internationalization support (Section 18), and on security
state of the lock. (Section 19).
Finishing off the specification are sections on what it means to be
compliant with this specification (Section 17), on
internationalization support (Section 18), and on security (Section
19).
2. Notational Conventions 2. Notational Conventions
Since this document describes a set of extensions to the HTTP/1.1 Since this document describes a set of extensions to the HTTP/1.1
protocol, the augmented BNF used herein to describe protocol elements protocol, the augmented BNF used herein to describe protocol elements
is exactly the same as described in section 2.1 of RFC2616 [8], is exactly the same as described in section 2.1 of RFC2616 [7],
including the rules about implied linear white-space. Since this including the rules about implied linear white-space. Since this
augmented BNF uses the basic production rules provided in section 2.2 augmented BNF uses the basic production rules provided in section 2.2
of RFC2616 [8], these rules apply to this document as well. of RFC2616 [7], these rules apply to this document as well.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC2119 [3]. document are to be interpreted as described in RFC2119 [2].
3. Terminology 3. Terminology
URI/URL - A Uniform Resource Identifier and Uniform Resource Locator, URI/URL - A Uniform Resource Identifier and Uniform Resource Locator,
respectively. These terms (and the distinction between them) are respectively. These terms (and the distinction between them) are
defined in RFC2396 [6]. defined in RFC2396 [5].
Collection - A resource that contains a set of URLs, which identify Collection - A resource that contains a set of URLs, which identify
and locate member resources and which meet the collections and locate member resources and which meet the collections
requirements (Section 5). requirements (Section 5).
Member URL - A URL which is a member of the set of URLs contained by Member URL - A URL which is a member of the set of URLs contained by
a collection. a collection.
Internal Member URL - A Member URL that is immediately relative to Internal Member URL - A Member URL that is immediately relative to
the URL of the collection (the definition of immediately relative is the URL of the collection (the definition of immediately relative is
skipping to change at page 6, line 5 skipping to change at page 10, line 35
Live Property - A property whose semantics and syntax are enforced by Live Property - A property whose semantics and syntax are enforced by
the server. For example, the live "getcontentlength" property has the server. For example, the live "getcontentlength" property has
its value, the length of the entity returned by a GET request, its value, the length of the entity returned by a GET request,
automatically calculated by the server. automatically calculated by the server.
Dead Property - A property whose semantics and syntax are not Dead Property - A property whose semantics and syntax are not
enforced by the server. The server only records the value of a dead enforced by the server. The server only records the value of a dead
property; the client is responsible for maintaining the consistency property; the client is responsible for maintaining the consistency
of the syntax and semantics of a dead property. of the syntax and semantics of a dead property.
Principal - A "principal" is a distinct human or computational actor
that initiates access to network resources.
4. Data Model for Resource Properties 4. Data Model for Resource Properties
4.1 The Resource Property Model 4.1 The Resource Property Model
Properties are pieces of data that describe the state of a resource. Properties are pieces of data that describe the state of a resource.
Properties are data about data. Properties are data about data.
Properties are used in distributed authoring environments to provide Properties are used in distributed authoring environments to provide
for efficient discovery and management of resources. For example, a for efficient discovery and management of resources. For example, a
'subject' property might allow for the indexing of all resources by 'subject' property might allow for the indexing of all resources by
skipping to change at page 6, line 32 skipping to change at page 11, line 32
There are two categories of properties: "live" and "dead". A live There are two categories of properties: "live" and "dead". A live
property has its syntax and semantics enforced by the server. Live property has its syntax and semantics enforced by the server. Live
properties include cases where a) the value of a property is read- properties include cases where a) the value of a property is read-
only, maintained by the server, and b) the value of the property is only, maintained by the server, and b) the value of the property is
maintained by the client, but the server performs syntax checking on maintained by the client, but the server performs syntax checking on
submitted values. All instances of a given live property MUST comply submitted values. All instances of a given live property MUST comply
with the definition associated with that property name. A dead with the definition associated with that property name. A dead
property has its syntax and semantics enforced by the client; the property has its syntax and semantics enforced by the client; the
server merely records the value of the property verbatim. server merely records the value of the property verbatim.
4.2 Existing Metadata Proposals 4.2 Properties and HTTP Headers
Properties have long played an essential role in the maintenance of
large document repositories, and many current proposals contain some
notion of a property, or discuss web metadata more generally. These
include PICS [20], PICS-NG, XML, Web Collections, and several
proposals on representing relationships within HTML. Work on PICS-NG
and Web Collections has been subsumed by the Resource Description
Framework (RDF) metadata activity of the World Wide Web Consortium.
RDF consists of a network-based data model and an XML representation
of that model.
Some proposals come from a digital library perspective. These
include the Dublin Core [RFC2413] metadata set and the Warwick
Framework [WF], a container architecture for different metadata
schemas. The literature includes many examples of metadata,
including MARC [USMARC], a bibliographic metadata format, and a
technical report bibliographic format employed by the Dienst system
[RFC1807]. Additionally, the proceedings from the first IEEE
Metadata conference describe many community-specific metadata sets.
Participants of the 1996 Metadata II Workshop in Warwick, UK [WF],
noted that "new metadata sets will develop as the networked
infrastructure matures" and "different communities will propose,
design, and be responsible for different types of metadata." These
observations can be corroborated by noting that many community-
specific sets of metadata already exist, and there is significant
motivation for the development of new forms of metadata as many
communities increasingly make their data available in digital form,
requiring a metadata format to assist data location and cataloging.
4.3 Properties and HTTP Headers
Properties already exist, in a limited sense, in HTTP message Properties already exist, in a limited sense, in HTTP message
headers. However, in distributed authoring environments a relatively headers. However, in distributed authoring environments a relatively
large number of properties are needed to describe the state of a large number of properties are needed to describe the state of a
resource, and setting/returning them all through HTTP headers is resource, and setting/returning them all through HTTP headers is
inefficient. Thus a mechanism is needed which allows a principal to inefficient. Thus a mechanism is needed which allows a principal to
identify a set of properties in which the principal is interested and identify a set of properties in which the principal is interested and
to set or retrieve just those properties. to set or retrieve just those properties.
4.4 XML Usage 4.3 XML Usage
In HTTP/1.1, method parameter information was exclusively encoded in In HTTP/1.1, method parameter information was exclusively encoded in
HTTP headers. Unlike HTTP/1.1, WebDAV encodes method parameter HTTP headers. Unlike HTTP/1.1, WebDAV encodes method parameter
information either in an XML [11] request entity body, or in an HTTP information either in an XML [11] request entity body, or in an HTTP
header. The use of XML to encode method parameters was motivated by header. The use of XML to encode method parameters was motivated by
the ability to add extra XML elements to existing structures, the ability to add extra XML elements to existing structures,
providing extensibility; and by XML's ability to encode information providing extensibility; and by XML's ability to encode information
in ISO 10646 character sets, providing internationalization support. in ISO 10646 character sets, providing internationalization support.
In addition to encoding method parameters, XML is used in WebDAV to In addition to encoding method parameters, XML is used in WebDAV to
skipping to change at page 8, line 8 skipping to change at page 12, line 25
WebDAV working group. WebDAV working group.
Note that "DAV:" is a scheme name defined solely to provide a Note that "DAV:" is a scheme name defined solely to provide a
namespace for WebDAV XML elements and property names. This practice namespace for WebDAV XML elements and property names. This practice
is discouraged in part because registration of new scheme names is is discouraged in part because registration of new scheme names is
difficult. "DAV:" was defined as the WebDAV namespace before difficult. "DAV:" was defined as the WebDAV namespace before
standard best practices emerged, and this namespace is kept and still standard best practices emerged, and this namespace is kept and still
used because of significant existing deployments, but this should not used because of significant existing deployments, but this should not
be emulated. be emulated.
4.5 Property Values 4.4 Property Values
The value of a property is always a (well-formed) XML fragment. The value of a property is always a (well-formed) XML fragment.
XML has been chosen because it is a flexible, self-describing, XML has been chosen because it is a flexible, self-describing,
structured data format that supports rich schema definitions, and structured data format that supports rich schema definitions, and
because of its support for multiple character sets. XML's self- because of its support for multiple character sets. XML's self-
describing nature allows any property's value to be extended by describing nature allows any property's value to be extended by
adding new elements. Older clients will not break when they adding new elements. Older clients will not break when they
encounter extensions because they will still have the data specified encounter extensions because they will still have the data specified
in the original schema and will ignore elements they do not in the original schema and will ignore elements they do not
skipping to change at page 8, line 47 skipping to change at page 13, line 17
further XML elements, namespaces that are in scope for that part of further XML elements, namespaces that are in scope for that part of
the XML document apply within the property value as well, and MUST be the XML document apply within the property value as well, and MUST be
preserved in server storage for retransmission later. Namespace preserved in server storage for retransmission later. Namespace
prefixes need not be preserved due to the rules of prefix declaration prefixes need not be preserved due to the rules of prefix declaration
in XML. in XML.
Attributes on the property name element may convey information about Attributes on the property name element may convey information about
the property, but are not considered part of the value. However, the property, but are not considered part of the value. However,
when language information appears in the 'xml:lang' attribute on the when language information appears in the 'xml:lang' attribute on the
property name element, the language information MUST be preserved in property name element, the language information MUST be preserved in
server storage for retransmission later. server storage for retransmission later. Note that a property only
has one value, in one language (or language MAY be left undefined),
not multiple values in different languages or a single value in
multiple languages.
The XML attribute xml:space MUST NOT be used to change white space The XML attribute xml:space MUST NOT be used to change white space
handling. White space in property values is significant. handling. White space in property values is significant.
4.6 Property Names 4.5 Property Names
A property name is a universally unique identifier that is associated A property name is a universally unique identifier that is associated
with a schema that provides information about the syntax and with a schema that provides information about the syntax and
semantics of the property. semantics of the property.
Because a property's name is universally unique, clients can depend Because a property's name is universally unique, clients can depend
upon consistent behavior for a particular property across multiple upon consistent behavior for a particular property across multiple
resources, on the same and across different servers, so long as that resources, on the same and across different servers, so long as that
property is "live" on the resources in question, and the property is "live" on the resources in question, and the
implementation of the live property is faithful to its definition. implementation of the live property is faithful to its definition.
The XML namespace mechanism, which is based on URIs [6], is used to The XML namespace mechanism, which is based on URIs [5], is used to
name properties because it prevents namespace collisions and provides name properties because it prevents namespace collisions and provides
for varying degrees of administrative control. for varying degrees of administrative control.
The property namespace is flat; that is, no hierarchy of properties The property namespace is flat; that is, no hierarchy of properties
is explicitly recognized. Thus, if a property A and a property A/B is explicitly recognized. Thus, if a property A and a property A/B
exist on a resource, there is no recognition of any relationship exist on a resource, there is no recognition of any relationship
between the two properties. It is expected that a separate between the two properties. It is expected that a separate
specification will eventually be produced which will address issues specification will eventually be produced which will address issues
relating to hierarchical properties. relating to hierarchical properties.
Finally, it is not possible to define the same property twice on a Finally, it is not possible to define the same property twice on a
single resource, as this would cause a collision in the resource's single resource, as this would cause a collision in the resource's
property namespace. property namespace.
4.6 Source Resources and Output Resources
Some HTTP resources are dynamically generated by the server. For
these resources, there presumably exists source code somewhere
governing how that resource is generated. The relationship of source
files to output HTTP resources may be one to one, one to many, many
to one or many to many. There is no mechanism in HTTP to determine
whether a resource is even dynamic, let alone where its source files
exist or how to author them. Although this problem would usefully be
solved, interoperable WebDAV implementations have been widely
deployed without actually solving this problem, by dealing only with
static resources. Thus, the source vs. output problem is not solved
in this specification and has been deferred to a separate document.
5. Collections of Web Resources 5. Collections of Web Resources
This section provides a description of a new type of Web resource, This section provides a description of a new type of Web resource,
the collection, and discusses its interactions with the HTTP URL the collection, and discusses its interactions with the HTTP URL
namespace. The purpose of a collection resource is to model namespace. The purpose of a collection resource is to model
collection-like objects (e.g., file system directories) within a collection-like objects (e.g., file system directories) within a
server's namespace. server's namespace.
All DAV compliant resources MUST support the HTTP URL namespace model All DAV compliant resources MUST support the HTTP URL namespace model
specified herein. specified herein.
5.1 HTTP URL Namespace Model 5.1 HTTP URL Namespace Model
The HTTP URL namespace is a hierarchical namespace where the The HTTP URL namespace is a hierarchical namespace where the
hierarchy is delimited with the "/" character. hierarchy is delimited with the "/" character.
An HTTP URL namespace is said to be consistent if it meets the An HTTP URL namespace is said to be consistent if it meets the
following conditions: for every URL in the HTTP hierarchy there following conditions: for every URL in the HTTP hierarchy there
exists a collection that contains that URL as an internal member. exists a collection that contains that URL as an internal member.
The root, or top-level collection of the namespace under The root, or top-level collection of the namespace under
consideration is exempt from the previous rule. consideration is exempt from the previous rule. The top-level
collection of the namespace under consideration is not necessarily
the collection identified by the absolute path '/', it may be
identified by one or more path segments (e.g. /servlets/webdav/...)
Neither HTTP/1.1 nor WebDAV require that the entire HTTP URL Neither HTTP/1.1 nor WebDAV require that the entire HTTP URL
namespace be consistent. However, certain WebDAV methods are namespace be consistent -- a WebDAV-compatible resource may not have
prohibited from producing results that cause namespace a parent collection. However, certain WebDAV methods are prohibited
inconsistencies. from producing results that cause namespace inconsistencies.
Although implicit in RFC2616 [8] and RFC2396 [6], any resource, Although implicit in RFC2616 [7] and RFC2396 [5], any resource,
including collection resources, MAY be identified by more than one including collection resources, MAY be identified by more than one
URI. For example, a resource could be identified by multiple HTTP URI. For example, a resource could be identified by multiple HTTP
URLs. URLs.
5.2 Collection Resources 5.2 Collection Resources
A collection is a resource whose state consists of at least a list of A collection is a resource whose state consists of at least a list of
internal member URLs and a set of properties, but which may have internal member URLs and a set of properties, but which may have
additional state such as entity bodies returned by GET. An internal additional state such as entity bodies returned by GET. An internal
member URL MUST be immediately relative to a base URL of the member URL MUST be immediately relative to a base URL of the
collection. That is, the internal member URL is equal to a collection. That is, the internal member URL is equal to a
containing collection's URL plus an additional segment for non- containing collection's URL plus an additional segment for non-
collection resources, or additional segment plus trailing slash "/" collection resources, or additional segment plus trailing slash "/"
for collection resources, where segment is defined in section 3.3 of for collection resources, where segment is defined in section 3.3 of
RFC2396 [6]. RFC2396 [5].
Any given internal member URL MUST only belong to the collection Any given internal member URL MUST only belong to the collection
once, i.e., it is illegal to have multiple instances of the same URL once, i.e., it is illegal to have multiple instances of the same URL
in a collection. Properties defined on collections behave exactly as in a collection. Properties defined on collections behave exactly as
do properties on non-collection resources. do properties on non-collection resources.
For all WebDAV compliant resources A and B, identified by URLs U and For all WebDAV compliant resources A and B, identified by URLs U and
V, for which U is immediately relative to V, B MUST be a collection V, for which U is immediately relative to V, B MUST be a collection
that has U as an internal member URL. So, if the resource with URL that has U as an internal member URL. So, if the resource with URL
http://example.com/bar/blah is WebDAV compliant and if the resource http://example.com/bar/blah is WebDAV compliant and if the resource
with URL http://example.com/bar/ is WebDAV compliant then the with URL http://example.com/bar/ is WebDAV compliant then the
resource with URL http://example.com/bar/ must be a collection and resource with URL http://example.com/bar/ must be a collection and
must contain URL http://example.com/bar/blah as an internal member. must contain URL http://example.com/bar/blah as an internal member.
Collection resources MAY list the URLs of non-WebDAV compliant Collection resources MAY list the URLs of non-WebDAV compliant
children in the HTTP URL namespace hierarchy as internal members but children in the HTTP URL namespace hierarchy as internal members but
are not required to do so. For example, if the resource with URL are not required to do so. For example, if the resource with URL
http://example.com/bar/blah is not WebDAV compliant and the URL http://example.com/bar/blah is not WebDAV compliant and the URL
http://example.com/bar/ identifies a collection then URL http:// http://example.com/bar/ identifies a collection then URL
example.com/bar/blah may or may not be an internal member of the http://example.com/bar/blah may or may not be an internal member of
collection with URL http://example.com/bar/. the collection with URL http://example.com/bar/.
If a WebDAV compliant resource has no WebDAV compliant children in If a WebDAV compliant resource has no WebDAV compliant children in
the HTTP URL namespace hierarchy then the WebDAV compliant resource the HTTP URL namespace hierarchy then the WebDAV compliant resource
is not required to be a collection. is not required to be a collection.
There is a standing convention that when a collection is referred to There is a standing convention that when a collection is referred to
by its name without a trailing slash, the server MAY handle the by its name without a trailing slash, the server MAY handle the
request as if the trailing slash were present. In this case it request as if the trailing slash were present. In this case it
SHOULD return a Content-Location header in the response, pointing to SHOULD return a Content-Location header in the response, pointing to
the URL ending with the "/". For example, if a client invokes a the URL ending with the "/". For example, if a client invokes a
method on http://example.bar/blah (no trailing slash), the server may method on http://example.bar/blah (no trailing slash), the server may
respond as if the operation were invoked on http://example.com/blah/ respond as if the operation were invoked on http://example.com/blah/
(trailing slash), and should return a Content-Location header with (trailing slash), and should return a Content-Location header with
the value http://example.bar/blah/. Wherever a server produces a URL the value http://example.bar/blah/. Wherever a server produces a URL
referring to a collection, the server MUST include the trailing referring to a collection, the server MUST include the trailing
slash. In general clients SHOULD use the "/" form of collection slash. In general clients SHOULD use the "/" form of collection
names. names.
A resource MAY be a collection but not be WebDAV compliant. That is,
the resource may comply with all the rules set out in this
specification regarding how a collection is to behave without
necessarily supporting all methods that a WebDAV compliant resource
is required to support. In such a case the resource may return the
DAV:resourcetype property with the value DAV:collection but MUST NOT
return a DAV header containing the value "1" on an OPTIONS response.
Clients MUST be able to support the case where WebDAV resources are Clients MUST be able to support the case where WebDAV resources are
contained inside non-WebDAV resources. For example, if a OPTIONS contained inside non-WebDAV resources. For example, if a OPTIONS
response from "http://example.com/servlet/dav/collection" indicates response from "http://example.com/servlet/dav/collection" indicates
WebDAV support, the client cannot assume that "http://example.com/ WebDAV support, the client cannot assume that
servlet/dav/" or its parent necessarily are WebDAV collections. "http://example.com/servlet/dav/" or its parent necessarily are
WebDAV collections.
5.3 Source Resources and Output Resources
For many resources, the entity returned by a GET method exactly
matches the persistent state of the resource, for example, a GIF file
stored on a disk. For this simple case, the URL at which a resource
is accessed is identical to the URL at which the source (the
persistent state) of the resource is accessed. This is also the case
for HTML source files that are not processed by the server prior to
transmission.
However, the server can sometimes process HTML resources before they
are transmitted as a return entity body. For example, a server-
side-include directive within an HTML file might instruct a server to
replace the directive with another value, such as the current date.
In this case, what is returned by GET (HTML plus date) differs from
the persistent state of the resource (HTML plus directive).
Typically there is no way to access the HTML resource containing the
unprocessed directive.
Sometimes the entity returned by GET is the output of a data-
producing process that is described by one or more source resources
(that may not even have a location in the URI namespace). A single
data-producing process may dynamically generate the state of a
potentially large number of output resources. An example of this is
a CGI script that describes a "finger" gateway process that maps part
of the namespace of a server into finger requests, such as http://
finger.example.com/finger_gateway/user@host.
Although this problem would usefully be solved, interoperable WebDAV
implementations have been widely deployed without actually solving
this problem. Thus, the source vs. output problem is not solved in
this specification, and has been deferred to a separate document.
6. Locking 6. Locking
The ability to lock a resource provides a mechanism for serializing The ability to lock a resource provides a mechanism for serializing
access to that resource. Using a lock, an authoring client can access to that resource. Using a lock, an authoring client can
provide a reasonable guarantee that another principal will not modify provide a reasonable guarantee that another principal will not modify
a resource while it is being edited. In this way, a client can a resource while it is being edited. In this way, a client can
prevent the "lost update" problem. prevent the "lost update" problem.
This specification allows locks to vary over two client-specified This specification allows locks to vary over two client-specified
parameters, the number of principals involved (exclusive vs. shared) parameters, the number of principals involved (exclusive vs. shared)
and the type of access to be granted. This document defines locking and the type of access to be granted. This document defines locking
for only one access type, write. However, the syntax is extensible, for only one access type, write. However, the syntax is extensible,
and permits the eventual specification of locking for other access and permits the eventual specification of locking for other access
types. types.
6.1 Exclusive Vs. Shared Locks 6.1 Exclusive Vs. Shared Locks
The most basic form of lock is an exclusive lock. Only one exclusive The most basic form of lock is an exclusive lock. Only one exclusive
lock may exist on any resource, whether it is directly or indirectly lock may exist on any resource, whether it is directly or indirectly
locked (Section 7.5). Exclusive locks avoid having to merge results, locked (Section 7.7). Exclusive locks avoid having to merge results,
without requiring any coordination other than the methods described without requiring any coordination other than the methods described
in this specification. in this specification.
However, there are times when the goal of a lock is not to exclude However, there are times when the goal of a lock is not to exclude
others from exercising an access right but rather to provide a others from exercising an access right but rather to provide a
mechanism for principals to indicate that they intend to exercise mechanism for principals to indicate that they intend to exercise
their access rights. Shared locks are provided for this case. A their access rights. Shared locks are provided for this case. A
shared lock allows multiple principals to receive a lock. Hence any shared lock allows multiple principals to receive a lock. Hence any
principal with appropriate access can use the lock. principal with appropriate access can use the lock.
skipping to change at page 15, line 12 skipping to change at page 19, line 12
property can be queried using PROPFIND and the token can be property can be queried using PROPFIND and the token can be
discovered that way. Each lock has only one unique lock token. discovered that way. Each lock has only one unique lock token.
Lock token URIs MUST be unique across all resources for all time. Lock token URIs MUST be unique across all resources for all time.
This uniqueness constraint allows lock tokens to be submitted across This uniqueness constraint allows lock tokens to be submitted across
resources and servers without fear of confusion. resources and servers without fear of confusion.
This specification provides a lock token URI scheme called This specification provides a lock token URI scheme called
opaquelocktoken that meets the uniqueness requirements. However opaquelocktoken that meets the uniqueness requirements. However
resources are free to return any URI scheme so long as it meets the resources are free to return any URI scheme so long as it meets the
uniqueness requirements. The IETF recommends using registered URI uniqueness requirements. According to current IETF best practices,
schemes to ensure uniqueness. implementations SHOULD use registered URI schemes to ensure
uniqueness.
Having a lock token provides no special access rights. Anyone can Submitting a lock token does not confer full privilege to use the
find out anyone else's lock token by performing lock discovery. lock token or modify the locked resource. Anyone can find out anyone
Locks MUST be enforced based upon whatever authentication mechanism else's lock token by performing lock discovery. Write access and
is used by the server, not based on the secrecy of the token values. other privileges MUST be enforced through normal privilege or
authentication mechanisms, not based on the slight obscurity of lock
token values.
6.4 opaquelocktoken Lock Token URI Scheme Since lock tokens are unique, a client MAY submit a lock token in an
If header on a resource other than the one that returned it.
The opaquelocktoken URI scheme is designed to be unique across all 6.4 Lock Token URI Schemes
resources for all time. Due to this uniqueness quality, a client may
submit an opaque lock token in an If header on a resource other than
the one that returned it.
In order to guarantee uniqueness across all resources for all time In order to guarantee uniqueness across all resources for all time a
the opaquelocktoken requires the use of the Universal Unique server MAY use the Universal Unique Identifier (UUID) [9] mechanism
Identifier (UUID) mechanism, as described in ISO-11578 [12]. to generate a lock token:
Opaquelocktoken generators, however, have a choice of how they create urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6
these tokens. They can either generate a new UUID for every lock
token they create or they can create a single UUID and then add The 'opaquelocktoken' URI scheme extends the UUID mechanism slightly
extension characters. If the second method is selected then the while still guaranteeing the lock token to be unique across all
program generating the extensions MUST guarantee that the same resources for all time. With the 'opaquelocktoken' scheme, the
extension will never be used twice with the associated UUID. server MAY reuse a UUID with extension characters added. If the
server does this then the algorithm generating the extensions MUST
guarantee that the same extension will never be used twice with the
associated UUID.
OpaqueLockToken-URI = "opaquelocktoken:" UUID [Extension] ; The UUID OpaqueLockToken-URI = "opaquelocktoken:" UUID [Extension] ; The UUID
production is the string representation of a UUID, as defined in production is the string representation of a UUID. Note that white
ISO-11578 [12]. Note that white space (LWS) is not allowed between space (LWS) is not allowed between elements of this production.
elements of this production.
Extension = path ; path is defined in section 3.3 of RFC2396 [6] Extension = path ; path is defined in section 3.3 of RFC2396 [5]
6.5 Lock Capability Discovery 6.5 Lock Capability Discovery
Since server lock support is optional, a client trying to lock a Since server lock support is optional, a client trying to lock a
resource on a server can either try the lock and hope for the best, resource on a server can either try the lock and hope for the best,
or perform some form of discovery to determine what lock capabilities or perform some form of discovery to determine what lock capabilities
the server supports. This is known as lock capability discovery. A the server supports. This is known as lock capability discovery. A
client can determine what lock types the server supports by client can determine what lock types the server supports by
retrieving the supportedlock property. retrieving the supportedlock property.
skipping to change at page 16, line 19 skipping to change at page 20, line 22
If another principal locks a resource that a principal wishes to If another principal locks a resource that a principal wishes to
access, it is useful for the second principal to be able to find out access, it is useful for the second principal to be able to find out
who the first principal is. For this purpose the lockdiscovery who the first principal is. For this purpose the lockdiscovery
property is provided. This property lists all outstanding locks, property is provided. This property lists all outstanding locks,
describes their type, and where available, provides their lock token. describes their type, and where available, provides their lock token.
Any DAV compliant resource that supports the LOCK method MUST support Any DAV compliant resource that supports the LOCK method MUST support
the lockdiscovery property. the lockdiscovery property.
6.7 Avoiding Lost Updates 6.7 Locks and Multiple Bindings
Although the locking mechanisms specified here provide some help in
preventing lost updates, they cannot guarantee that updates will
never be lost. Consider the following scenario:
Two clients A and B are interested in editing the resource
'index.html'. Client A is an HTTP client rather than a WebDAV
client, and so does not know how to perform locking.
Client A doesn't lock the document, but does a GET and begins
editing.
Client B does LOCK, performs a GET and begins editing.
Client B finishes editing, performs a PUT, then an UNLOCK.
Client A performs a PUT, overwriting and losing all of B's changes.
There are several reasons why the WebDAV protocol itself cannot
prevent this situation. First, it cannot force all clients to use
locking because it must be compatible with HTTP clients that do not
comprehend locking. Second, it cannot require servers to support
locking because of the variety of repository implementations, some of
which rely on reservations and merging rather than on locking.
Finally, being stateless, it cannot enforce a sequence of operations
like LOCK / GET / PUT / UNLOCK.
WebDAV servers that support locking can reduce the likelihood that
clients will accidentally overwrite each other's changes by requiring
clients to lock resources before modifying them. Such servers would
effectively prevent HTTP 1.0 and HTTP 1.1 clients from modifying
resources.
WebDAV clients can be good citizens by using a lock / retrieve /
write /unlock sequence of operations (at least by default) whenever
they interact with a WebDAV server that supports locking.
HTTP 1.1 clients can be good citizens, avoiding overwriting other
clients' changes, by using entity tags in If-Match headers with any
requests that would modify resources.
Information managers may attempt to prevent overwrites by
implementing client-side procedures requiring locking before
modifying WebDAV resources.
6.8 Locks and Multiple Bindings
A resource may be made available through more than one URI. However A resource may be made available through more than one URI. However
locks apply to resources, not URIs. Therefore a LOCK request on a locks apply to resources, not URIs. Therefore a LOCK request on a
resource MUST NOT succeed if can not be honored by all the URIs resource MUST NOT succeed if can not be honored by all the URIs
through which the resource is addressable. through which the resource is addressable.
7. Write Lock 7. Write Lock
This section describes the semantics specific to the write lock type. This section describes the semantics specific to the write lock type.
The write lock is a specific instance of a lock type, and is the only The write lock is a specific instance of a lock type, and is the only
lock type described in this specification. lock type described in this specification.
Write locks prevent unauthorized changes to resources. In general An exclusive write lock will prevent parallel changes to a resource
terms, changes affected by write locks include changes to: by any principal other than the write lock holder. In general terms,
changes affected by write locks include changes to:
o the content of the resource o the content of the resource
o any dead property of the resource o any dead property of the resource
o any live property defined to be lockable (all properties defined o any live property defined to be lockable (all properties defined
in this specification are lockable) in this specification are lockable)
o the direct membership of the resource, if it is a collection o the direct membership of the resource, if it is a collection
o the URL/location of a resource o the URL/location of a resource
The next few sections describe in more specific terms how write locks The next few sections describe in more specific terms how write locks
interact with various operations. interact with various operations.
7.1 Methods Restricted by Write Locks 7.1 Lock Owner
A write lock MUST prevent a principal without the lock from The creator of the lock is the lock owner. The server MUST restrict
successfully executing a PUT, POST, PROPPATCH, LOCK, UNLOCK, MOVE, the usage of the lock token to the lock owner (both for shared and
DELETE, or MKCOL on the locked resource. All other current methods, exclusive locks -- for multi-user shared lock cases, each
GET in particular, function independently of the lock. authenticated principal MUST obtain its own shared lock).
The server MAY allow privileged users other than the lock owner to
destroy a lock (for example, the resource owner or an administrator)
as a special case of lock usage.
If an anonymous user requests a lock, the server MAY refuse the
request.
7.2 Methods Restricted by Write Locks
A server MUST reject any write request that alters a write-locked
resource unless a valid lock token is provided. The write operations
defined in HTTP and WebDAV are PUT, POST, PROPPATCH, LOCK, UNLOCK,
MOVE, COPY (for the destination resource), DELETE, and MKCOL. All
other HTTP/WebDAV methods, GET in particular, function independently
of the lock. A shared write lock prevents the same operations,
however it also allows access by any principal that has a shared
write lock on the same resource.
Note, however, that as new methods are created it will be necessary Note, however, that as new methods are created it will be necessary
to specify how they interact with a write lock. to specify how they interact with a write lock.
7.2 Write Locks and Lock Tokens 7.3 Write Locks and Lock Tokens
A successful request for an exclusive or shared write lock MUST A successful request for an exclusive or shared write lock MUST
result in the generation of a unique lock token associated with the result in the generation of a unique lock token associated with the
requesting principal. Thus if five principals have a shared write requesting principal. Thus if five principals have a shared write
lock on the same resource there will be five lock tokens, one for lock on the same resource there will be five lock tokens, one for
each principal. each principal.
7.3 Write Locks and Properties 7.4 Write Locks and Properties
While those without a write lock may not alter a property on a While those without a write lock may not alter a property on a
resource it is still possible for the values of live properties to resource it is still possible for the values of live properties to
change, even while locked, due to the requirements of their schemas. change, even while locked, due to the requirements of their schemas.
Only dead properties and live properties defined to respect locks are Only dead properties and live properties defined to respect locks are
guaranteed not to change while write locked. guaranteed not to change while write locked.
7.4 Write Locks and Unmapped URLs 7.5 Avoiding Lost Updates
Although the write locks provide some help in preventing lost
updates, they cannot guarantee that updates will never be lost.
Consider the following scenario:
Two clients A and B are interested in editing the resource
'index.html'. Client A is an HTTP client rather than a WebDAV
client, and so does not know how to perform locking.
Client A doesn't lock the document, but does a GET and begins
editing.
Client B does LOCK, performs a GET and begins editing.
Client B finishes editing, performs a PUT, then an UNLOCK.
Client A performs a PUT, overwriting and losing all of B's changes.
There are several reasons why the WebDAV protocol itself cannot
prevent this situation. First, it cannot force all clients to use
locking because it must be compatible with HTTP clients that do not
comprehend locking. Second, it cannot require servers to support
locking because of the variety of repository implementations, some of
which rely on reservations and merging rather than on locking.
Finally, being stateless, it cannot enforce a sequence of operations
like LOCK / GET / PUT / UNLOCK.
WebDAV servers that support locking can reduce the likelihood that
clients will accidentally overwrite each other's changes by requiring
clients to lock resources before modifying them. Such servers would
effectively prevent HTTP 1.0 and HTTP 1.1 clients from modifying
resources.
WebDAV clients can be good citizens by using a lock / retrieve /
write /unlock sequence of operations (at least by default) whenever
they interact with a WebDAV server that supports locking.
HTTP 1.1 clients can be good citizens, avoiding overwriting other
clients' changes, by using entity tags in If-Match headers with any
requests that would modify resources.
Information managers may attempt to prevent overwrites by
implementing client-side procedures requiring locking before
modifying WebDAV resources.
7.6 Write Locks and Unmapped URLs
It is possible to lock an unmapped URL in order to lock the name for It is possible to lock an unmapped URL in order to lock the name for
use. This is a simple way to avoid the lost-update problem on the use. This is a simple way to avoid the lost-update problem on the
creation of a new resource (another way is to use If-None-Match creation of a new resource (another way is to use If-None-Match
header specified in HTTP 1.1). It has the side benefit of locking header specified in HTTP 1.1). It has the side benefit of locking
the new resource immediately for use of the creator. the new resource immediately for use of the creator.
The lost-update problem is not an issue for collections because MKCOL The lost-update problem is not an issue for collections because MKCOL
can only be used to create a collection, not to overwrite an existing can only be used to create a collection, not to overwrite an existing
collection. In order to immediately lock a collection upon creation, collection. In order to immediately lock a collection upon creation,
skipping to change at page 20, line 31 skipping to change at page 25, line 14
Type value the server MUST set that value (this requirement actually Type value the server MUST set that value (this requirement actually
applies to any resource that is overwritten but is particularly applies to any resource that is overwritten but is particularly
necessary for locked empty resources which are initially created with necessary for locked empty resources which are initially created with
no Content-Type. no Content-Type.
Clients can easily interoperate both with servers that support the Clients can easily interoperate both with servers that support the
deprecated lock-null resources and servers that support simpler deprecated lock-null resources and servers that support simpler
locked empty resources by only attempting PUT after a LOCK to an locked empty resources by only attempting PUT after a LOCK to an
unmapped URL, not MKCOL or GET. unmapped URL, not MKCOL or GET.
7.5 Write Locks and Collections 7.7 Write Locks and Collections
A write lock on a collection, whether created by a "Depth: 0" or A write lock on a collection, whether created by a "Depth: 0" or
"Depth: infinity" lock request, prevents the addition or removal of "Depth: infinity" lock request, prevents the addition or removal of
member URLs of the collection by non-lock owners. member URLs of the collection by non-lock owners.
A zero-depth lock on a collection affects changes to the direct A zero-depth lock on a collection affects changes to the direct
membership of that collection. When a principal issues a PUT or POST membership of that collection. When a principal issues a write
request to create a new resource in a write locked collection, or request to create a new resource in a write locked collection, or
issues a DELETE to an existing internal member URL of a write locked isses a DELETE, MOVE or other request that would remove an existing
collection, this request MUST fail if the principal does not provide internal member URL of a write locked collection or change the
the correct lock token for the locked collection. binding name, this request MUST fail if the principal does not
provide the correct lock token for the locked collection.
This means that if a collection is locked (depth 0 or infinity), its
lock-token is required in all these cases:
o DELETE a collection's direct internal member
o MOVE a member out of the collection
o MOVE a member into the collection, unless it overwrites a pre-
existing member
o MOVE to rename it within a collection,
o COPY a member into a collection, unless it overwrites a pre-
existing member
o PUT or MKCOL request which would create a new member.
The collection's lock token is required in addition to the lock token
on the internal member itself, if it is locked separately.
In addition, a depth-infinity lock affects all write operations to In addition, a depth-infinity lock affects all write operations to
all descendents of the locked collection. With a depth-infinity all descendents of the locked collection. With a depth-infinity
lock, the root of the lock is directly locked, and all its lock, the root of the lock is directly locked, and all its
descendants are indirectly locked. descendants are indirectly locked.
o Any new resource added as a descendent of a depth-infinity locked o Any new resource added as a descendent of a depth-infinity locked
collection becomes indirectly locked. collection becomes indirectly locked.
o Any indirectly locked resource moved out of the locked collection o Any indirectly locked resource moved out of the locked collection
into an unlocked collection is thereafter unlocked. into an unlocked collection is thereafter unlocked.
o Any indirectly locked resource moved out of a locked source o Any indirectly locked resource moved out of a locked source
collection into a depth-infinity locked target collection remains collection into a depth-infinity locked target collection remains
indirectly locked but is now within the scope of the lock on the indirectly locked but is now within the scope of the lock on the
target collection (the target collection's lock token will target collection (the target collection's lock token will
thereafter be required to make further changes). thereafter be required to make further changes).
If a depth-infinity write LOCK request is issued to a collection If a depth-infinity write LOCK request is issued to a collection
skipping to change at page 21, line 25 skipping to change at page 26, line 31
contain the 'missing-lock-token' precondition. contain the 'missing-lock-token' precondition.
If a lock owner causes the URL of a resource to be added as an If a lock owner causes the URL of a resource to be added as an
internal member URL of a depth-infinity locked collection then the internal member URL of a depth-infinity locked collection then the
new resource MUST be automatically added to the lock. This is the new resource MUST be automatically added to the lock. This is the
only mechanism that allows a resource to be added to a write lock. only mechanism that allows a resource to be added to a write lock.
Thus, for example, if the collection /a/b/ is write locked and the Thus, for example, if the collection /a/b/ is write locked and the
resource /c is moved to /a/b/c then resource /a/b/c will be added to resource /c is moved to /a/b/c then resource /a/b/c will be added to
the write lock. the write lock.
7.6 Write Locks and the If Request Header 7.8 Write Locks and the If Request Header
If a user agent is not required to have knowledge about a lock when If a user agent is not required to have knowledge about a lock when
requesting an operation on a locked resource, the following scenario requesting an operation on a locked resource, the following scenario
might occur. Program A, run by User A, takes out a write lock on a might occur. Program A, run by User A, takes out a write lock on a
resource. Program B, also run by User A, has no knowledge of the resource. Program B, also run by User A, has no knowledge of the
lock taken out by Program A, yet performs a PUT to the locked lock taken out by Program A, yet performs a PUT to the locked
resource. In this scenario, the PUT succeeds because locks are resource. In this scenario, the PUT succeeds because locks are
associated with a principal, not a program, and thus program B, associated with a principal, not a program, and thus program B,
because it is acting with principal AȔs credential, is allowed to because it is acting with principal Ais credential, is allowed to
perform the PUT. However, had program B known about the lock, it perform the PUT. However, had program B known about the lock, it
would not have overwritten the resource, preferring instead to would not have overwritten the resource, preferring instead to
present a dialog box describing the conflict to the user. Due to present a dialog box describing the conflict to the user. Due to
this scenario, a mechanism is needed to prevent different programs this scenario, a mechanism is needed to prevent different programs
from accidentally ignoring locks taken out by other programs with the from accidentally ignoring locks taken out by other programs with the
same authorization. same authorization.
In order to prevent these collisions a lock token MUST be submitted In order to prevent these collisions a lock token MUST be submitted
by an authorized principal for all locked resources that a method may by an authorized principal for all locked resources that a method may
change or the method MUST fail. A lock token is submitted when it change or the method MUST fail. A lock token is submitted when it
skipping to change at page 22, line 27 skipping to change at page 27, line 29
HTTP/1.1 204 No Content HTTP/1.1 204 No Content
In this example, even though both the source and destination are In this example, even though both the source and destination are
locked, only one lock token must be submitted, for the lock on the locked, only one lock token must be submitted, for the lock on the
destination. This is because the source resource is not modified by destination. This is because the source resource is not modified by
a COPY, and hence unaffected by the write lock. In this example, a COPY, and hence unaffected by the write lock. In this example,
user agent authentication has previously occurred via a mechanism user agent authentication has previously occurred via a mechanism
outside the scope of the HTTP protocol, in the underlying transport outside the scope of the HTTP protocol, in the underlying transport
layer. layer.
7.7 Write Locks and COPY/MOVE 7.9 Write Locks and COPY/MOVE
A COPY method invocation MUST NOT duplicate any write locks active on A COPY method invocation MUST NOT duplicate any write locks active on
the source. However, as previously noted, if the COPY copies the the source. However, as previously noted, if the COPY copies the
resource into a collection that is locked with "Depth: infinity", resource into a collection that is locked with "Depth: infinity",
then the resource will be added to the lock. then the resource will be added to the lock.
A successful MOVE request on a write locked resource MUST NOT move A successful MOVE request on a write locked resource MUST NOT move
the write lock with the resource. However, the resource is subject the write lock with the resource. However, the resource is subject
to being added to an existing lock at the destination (see Section to being added to an existing lock at the destination (see
7.5). For example, if the MOVE makes the resource a child of a Section 7.7). For example, if the MOVE makes the resource a child of
collection that is locked with "Depth: infinity", then the resource a collection that is locked with "Depth: infinity", then the resource
will be added to that collection's lock. Additionally, if a resource will be added to that collection's lock. Additionally, if a resource
locked with "Depth: infinity" is moved to a destination that is locked with "Depth: infinity" is moved to a destination that is
within the scope of the same lock (e.g., within the namespace tree within the scope of the same lock (e.g., within the namespace tree
covered by the lock), the moved resource will again be a added to the covered by the lock), the moved resource will again be a added to the
lock. In both these examples, as specified in Section 7.6, an If lock. In both these examples, as specified in Section 7.8, an If
header must be submitted containing a lock token for both the source header must be submitted containing a lock token for both the source
and destination. and destination.
7.8 Refreshing Write Locks 7.10 Refreshing Write Locks
A client MUST NOT submit the same write lock request twice. Note A client MUST NOT submit the same write lock request twice. Note
that a client is always aware it is resubmitting the same lock that a client is always aware it is resubmitting the same lock
request because it must include the lock token in the If header in request because it must include the lock token in the If header in
order to make the request for a resource that is already locked. order to make the request for a resource that is already locked.
However, a client may submit a LOCK method with an If header but However, a client may submit a LOCK method with an If header but
without a body. This form of LOCK MUST only be used to "refresh" a without a body. This form of LOCK MUST only be used to "refresh" a
lock. Meaning, at minimum, that any timers associated with the lock lock. Meaning, at minimum, that any timers associated with the lock
MUST be re-set. MUST be re-set.
skipping to change at page 24, line 36 skipping to change at page 29, line 36
server MUST reject the request with 415 (Unsupported Media Type). server MUST reject the request with 415 (Unsupported Media Type).
This informs the client (which may have been attempting to use an This informs the client (which may have been attempting to use an
extension) that the body could not be processed as they intended. extension) that the body could not be processed as they intended.
8.1.3 Use of Location header in responses 8.1.3 Use of Location header in responses
When the Location header is used in a response, it is used by the When the Location header is used in a response, it is used by the
server to indicate the preferred address for the target resource of server to indicate the preferred address for the target resource of
the request. Whenever the server has a preferred address, it should the request. Whenever the server has a preferred address, it should
use that address consistently. This means that when a response use that address consistently. This means that when a response
contains a Location header, all the URLs in the response body (e.g. contains a Location header, all the URLs in the response body (e.g. a
a Multi-Status) should be consistent (most importantly, should use Multi-Status) should be consistent (most importantly, should use the
the same host and port). same host and port).
8.1.4 Required Response Headers: Date 8.1.4 Required Response Headers: Date
Note that HTTP 1.1 requires the Date header in all responses if Note that HTTP 1.1 requires the Date header in all responses if
possible. possible.
8.1.5 ETag 8.1.5 ETag
HTTP 1.1 recommends the use of the ETag header in responses to GET HTTP 1.1 recommends the use of the ETag header in responses to GET
and PUT requests. Correct use of ETags is even more important in a and PUT requests. Correct use of ETags is even more important in a
skipping to change at page 25, line 29 skipping to change at page 30, line 29
(or getlastmodified value) for a resource that has an unchanged body. (or getlastmodified value) for a resource that has an unchanged body.
The ETag represents the state of the body or contents of the The ETag represents the state of the body or contents of the
resource. There is no similar way to tell if properties have resource. There is no similar way to tell if properties have
changed. changed.
8.1.6 Including error response bodies 8.1.6 Including error response bodies
HTTP and WebDAV did not use the bodies of most error responses for HTTP and WebDAV did not use the bodies of most error responses for
machine-parsable information until DeltaV introduced a mechanism to machine-parsable information until DeltaV introduced a mechanism to
include more specific information in the body of an error response include more specific information in the body of an error response
(section 1.6 of RFC3253 [18]). The mechanism is appropriate to use (section 1.6 of RFC3253 [14]). The mechanism is appropriate to use
with any error response that may take a body but does not already with any error response that may take a body but does not already
have a body defined. The mechanism is particularly appropriate when have a body defined. The mechanism is particularly appropriate when
a status code can mean many things (for example, 400 Bad Request can a status code can mean many things (for example, 400 Bad Request can
mean required headers are missing, headers are incorrectly formatted, mean required headers are missing, headers are incorrectly formatted,
or much more). or much more).
This mechanism does not take the place of using a correct numeric This mechanism does not take the place of using a correct numeric
error code as defined here or in HTTP, because the client MUST always error code as defined here or in HTTP, because the client MUST always
be able to take a reasonable course of action based only on the be able to take a reasonable course of action based only on the
numeric error. However, it does remove the need to define new numeric error. However, it does remove the need to define new
numeric error codes, avoiding the confusion of who is allowed to numeric error codes, avoiding the confusion of who is allowed to
define such new codes. The codes used in this mechanism are XML define such new codes. The codes used in this mechanism are XML
elements in a namespace, so naturally any group defining a new error elements in a namespace, so naturally any group defining a new error
code can use their own namespace. As always, the "DAV:" namespace is code can use their own namespace. As always, the "DAV:" namespace is
reserved for use by IETF-chartered WebDAV working groups. reserved for use by IETF-chartered WebDAV working groups.
A server supporting "bis" SHOULD include a specific XML error code in A server supporting "bis" SHOULD include a specific XML error code in
a "DAV:error" response body element, when a specific XML error code a "DAV:error" response body element, when a specific XML error code
is defined in this document. The Č¼DAV:errorČ« element may contain is defined in this document. The DAV:error element may contain
multiple elements describing specific errors. For error conditions multiple elements describing specific errors. For error conditions
not specified in this document, the server MAY simply choose an not specified in this document, the server MAY simply choose an
appropriate numeric status and leave the response body blank. appropriate numeric status and leave the response body blank.
HTTP/1.1 403 Forbidden HTTP/1.1 403 Forbidden
Content-Type: text/xml; charset="utf-8" Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<D:error xmlns:D="DAV:"> <D:error xmlns:D="DAV:">
skipping to change at page 26, line 26 skipping to change at page 31, line 26
must have the "DAV:" namespace, appear in the "error" root element, must have the "DAV:" namespace, appear in the "error" root element,
and be returned in a body with the numeric error code specified. and be returned in a body with the numeric error code specified.
8.2 PROPFIND 8.2 PROPFIND
The PROPFIND method retrieves properties defined on the resource The PROPFIND method retrieves properties defined on the resource
identified by the Request-URI, if the resource does not have any identified by the Request-URI, if the resource does not have any
internal members, or on the resource identified by the Request-URI internal members, or on the resource identified by the Request-URI
and potentially its member resources, if the resource is a collection and potentially its member resources, if the resource is a collection
that has internal member URLs. All DAV compliant resources MUST that has internal member URLs. All DAV compliant resources MUST
support the PROPFIND method and the propfind XML element (Section support the PROPFIND method and the propfind XML element
13.25) along with all XML elements defined for use with that element. (Section 13.25) along with all XML elements defined for use with that
element.
A client may submit a Depth header with a value of "0", "1", or A client may submit a Depth header with a value of "0", "1", or
"infinity" with a PROPFIND on a collection resource. Servers MUST "infinity" with a PROPFIND on a collection resource. Servers MUST
support the "0", "1" and "infinity" behaviors on WebDAV-compliant support the "0", "1" and "infinity" behaviors on WebDAV-compliant
resources. By default, the PROPFIND method without a Depth header resources. By default, the PROPFIND method without a Depth header
MUST act as if a "Depth: infinity" header was included. MUST act as if a "Depth: infinity" header was included.
A client may submit a propfind XML element in the body of the request A client may submit a propfind XML element in the body of the request
method describing what information is being requested. It is method describing what information is being requested. It is
possible to request: possible to:
o Request particular property values, by naming the properties o Request particular property values, by naming the properties
desired within the 'prop' element (the ordering of properties in desired within the 'prop' element (the ordering of properties in
here MAY be ignored by server) here MAY be ignored by server)
o Request all dead property values, by using 'dead-props' element. o Request all dead property values, by using 'dead-props' element.
This can be combined with retrieving specific live properties This can be combined with retrieving specific live properties
named as above. Servers advertising support for RFC2518bis MUST named as above. Servers advertising support for RFC2518bis MUST
support this feature. support this feature.
o Request property values for those properties defined in this o Request property values for those properties defined in this
specification plus dead properties, by using 'allprop' element specification plus dead properties, by using 'allprop' element
o Request a list of names of all the properties defined on the o Request a list of names of all the properties defined on the
resource, by using the 'propname' element. resource, by using the 'propname' element.
A client may choose not to submit a request body. An empty PROPFIND A client may choose not to submit a request body. An empty PROPFIND
request body MUST be treated as if it were an 'allprop' request. request body MUST be treated as if it were an 'allprop' request.
Note that 'allprop' does not return values for all live properties. Note that 'allprop' does not return values for all live properties.
WebDAV servers increasingly have expensively-calculated or lengthy WebDAV servers increasingly have expensively-calculated or lengthy
skipping to change at page 27, line 7 skipping to change at page 32, line 12
o Request property values for those properties defined in this o Request property values for those properties defined in this
specification plus dead properties, by using 'allprop' element specification plus dead properties, by using 'allprop' element
o Request a list of names of all the properties defined on the o Request a list of names of all the properties defined on the
resource, by using the 'propname' element. resource, by using the 'propname' element.
A client may choose not to submit a request body. An empty PROPFIND A client may choose not to submit a request body. An empty PROPFIND
request body MUST be treated as if it were an 'allprop' request. request body MUST be treated as if it were an 'allprop' request.
Note that 'allprop' does not return values for all live properties. Note that 'allprop' does not return values for all live properties.
WebDAV servers increasingly have expensively-calculated or lengthy WebDAV servers increasingly have expensively-calculated or lengthy
properties (see RFC3253 [18] and RFC3744 [19]) and do not return all properties (see RFC3253 [14] and RFC3744 [15]) and do not return all
properties already. Instead, WebDAV clients can use propname properties already. Instead, WebDAV clients can use propname
requests to discover what live properties exist, and request named requests to discover what live properties exist, and request named
properties when retrieving values. A WebDAV server MAY omit certain properties when retrieving values. A WebDAV server MAY omit certain
live properties from other specifications when responding to an live properties from other specifications when responding to an
allprop request from an older client, and MAY return only custom allprop request from an older client, and MAY return only custom
(dead) properties and those defined in this specification. (dead) properties and those defined in this specification.
All servers MUST support returning a response of content type text/ All servers MUST support returning a response of content type text/
xml or application/xml that contains a multistatus XML element that xml or application/xml that contains a multistatus XML element that
describes the results of the attempts to retrieve the various describes the results of the attempts to retrieve the various
skipping to change at page 27, line 51 skipping to change at page 33, line 8
the parent collection. the parent collection.
Unless otherwise notified, clients may expect that the URL for the Unless otherwise notified, clients may expect that the URL for the
parent collection in the PROPFIND response will be the same URL that parent collection in the PROPFIND response will be the same URL that
was used to refer to the parent collection in the PROPFIND request. was used to refer to the parent collection in the PROPFIND request.
Servers MAY use an alternate URL for the parent collection in a Servers MAY use an alternate URL for the parent collection in a
PROPFIND response, but in this case the server MUST include a PROPFIND response, but in this case the server MUST include a
Content-Location header whose value is the fully-qualified URL used Content-Location header whose value is the fully-qualified URL used
by the server to refer to the parent collection in this response. by the server to refer to the parent collection in this response.
Clients expect the fully-qualified URLs of members of a collection to
have a common prefix which is the fully-qualified URL of the parent
collection itself.
URLs in a PROPFIND response body MAY be represented as fully- URLs in a PROPFIND response body MAY be represented as fully-
qualified URLs, in which case they must all contain the full parent qualified URLs, in which case they must all contain the full parent
collection URL (scheme, host, port, and absolute path). collection URL (scheme, host, port, and absolute path).
Alternatively, these URLs MAY be absolute paths (not containing Alternatively, these URLs MAY be absolute paths (not containing
scheme, host or port), but in this case they must all still contain scheme, host or port), but in this case they must all still contain
the full parent collection path. the full parent collection path.
If a server allows resource names to include characters that arenȔt If a server allows resource names to include characters that arenit
legal in HTTP URL paths, these characters must be URI-escaped on the legal in HTTP URL paths, these characters must be URI-escaped on the
wire. For example, it is illegal to use a space character or double- wire. For example, it is illegal to use a space character or double-
quote in a URI [6]. URIs appearing in PROPFIND or PROPPATCH XML quote in a URI [5]. URIs appearing in PROPFIND or PROPPATCH XML
bodies (or other XML marshalling defined in this specification) are bodies (or other XML marshalling defined in this specification) are
still subject to all URI rules, including forbidden characters. still subject to all URI rules, including forbidden characters.
Properties may be subject to access control. In the case of allprop Properties may be subject to access control. In the case of allprop
and propname, if a principal does not have the right to know whether and propname, if a principal does not have the right to know whether
a particular property exists then the property MAY be silently a particular property exists then the property MAY be silently
excluded from the response. excluded from the response.
The results of this method SHOULD NOT be cached. The results of this method SHOULD NOT be cached.
skipping to change at page 30, line 24 skipping to change at page 35, line 24
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:"> <D:propfind xmlns:D="DAV:">
<D:prop> <D:prop>
<D:creationdate/> <D:creationdate/>
<D:getlastmodified/> <D:getlastmodified/>
</D:prop> </D:prop>
<D:dead-props/> <D:dead-props/>
</D:propfind> </D:propfind>
In this example, PROPFIND is executed on a collection resource http:/ In this example, PROPFIND is executed on a collection resource
/www.example.com/mycol/. The client requests the values of two http://www.example.com/mycol/. The client requests the values of two
specific live properties plus all dead properties (names and values). specific live properties plus all dead properties (names and values).
The response is not shown. The response is not shown.
8.2.3 Example - Using propname to Retrieve all Property Names 8.2.3 Example - Using propname to Retrieve all Property Names
>>Request >>Request
PROPFIND /container/ HTTP/1.1 PROPFIND /container/ HTTP/1.1
Host: www.example.com Host: www.example.com
Content-Type: text/xml; charset="utf-8" Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx Content-Length: xxxx
skipping to change at page 31, line 42 skipping to change at page 36, line 42
</multistatus> </multistatus>
In this example, PROPFIND is invoked on the collection resource In this example, PROPFIND is invoked on the collection resource
http://www.example.com/container/, with a propfind XML element http://www.example.com/container/, with a propfind XML element
containing the propname XML element, meaning the name of all containing the propname XML element, meaning the name of all
properties should be returned. Since no Depth header is present, it properties should be returned. Since no Depth header is present, it
assumes its default value of "infinity", meaning the name of the assumes its default value of "infinity", meaning the name of the
properties on the collection and all its descendents should be properties on the collection and all its descendents should be
returned. returned.
Consistent with the previous example, resource http:// Consistent with the previous example, resource
www.example.com/container/ has six properties defined on it: bigbox http://www.example.com/container/ has six properties defined on it:
and author in the "http://www.example.com/boxschema/" namespace, and bigbox and author in the "http://www.example.com/boxschema/"
creationdate, displayname, resourcetype, and supportedlock in the namespace, and creationdate, displayname, resourcetype, and
"DAV:" namespace. supportedlock in the "DAV:" namespace.
The resource http://www.example.com/container/index.html, a member of The resource http://www.example.com/container/index.html, a member of
the "container" collection, has nine properties defined on it, bigbox the "container" collection, has nine properties defined on it, bigbox
in the "http://www.example.com/boxschema/" namespace and, in the "http://www.example.com/boxschema/" namespace and,
creationdate, displayname, getcontentlength, getcontenttype, getetag, creationdate, displayname, getcontentlength, getcontenttype, getetag,
getlastmodified, resourcetype, and supportedlock in the "DAV:" getlastmodified, resourcetype, and supportedlock in the "DAV:"
namespace. namespace.
This example also demonstrates the use of XML namespace scoping and This example also demonstrates the use of XML namespace scoping and
the default namespace. Since the "xmlns" attribute does not contain the default namespace. Since the "xmlns" attribute does not contain
skipping to change at page 35, line 8 skipping to change at page 40, line 32
the Request-URI is "/". If no such ancestor exists, the method MUST the Request-URI is "/". If no such ancestor exists, the method MUST
fail. When the MKCOL operation creates a new collection resource, fail. When the MKCOL operation creates a new collection resource,
all ancestors MUST already exist, or the method MUST fail with a 409 all ancestors MUST already exist, or the method MUST fail with a 409
(Conflict) status code. For example, if a request to create (Conflict) status code. For example, if a request to create
collection /a/b/c/d/ is made, and /a/b/c/ does not exist, the request collection /a/b/c/d/ is made, and /a/b/c/ does not exist, the request
must fail. must fail.
When MKCOL is invoked without a request body, the newly created When MKCOL is invoked without a request body, the newly created
collection SHOULD have no members. collection SHOULD have no members.
A MKCOL request message may contain a message body. The behavior of A MKCOL request message may contain a message body. The precise
a MKCOL request when the body is present is limited to creating behavior of a MKCOL request when the body is present is undefined,
collections, members of a collection, bodies of members and but limited to creating collections, members of a collection, bodies
properties on the collections or members. If the server receives a of members and properties on the collections or members. If the
MKCOL request entity type it does not support or understand it MUST server receives a MKCOL request entity type it does not support or
respond with a 415 (Unsupported Media Type) status code. If the understand it MUST respond with a 415 (Unsupported Media Type) status
server decides to reject the request based on the presence of an code. If the server decides to reject the request based on the
entity or the type of an entity, it should use the 415 (Unsupported presence of an entity or the type of an entity, it should use the 415
Media Type) status code. The exact behavior of MKCOL for various (Unsupported Media Type) status code.
request media types is undefined in this document, and will be
specified in separate documents.
8.4.1 MKCOL Status Codes 8.4.1 MKCOL Status Codes
Responses from a MKCOL request MUST NOT be cached as MKCOL has non- Responses from a MKCOL request MUST NOT be cached as MKCOL has non-
idempotent semantics. idempotent semantics.
201 (Created) - The collection was created. 201 (Created) - The collection was created.
403 (Forbidden) - This indicates at least one of two conditions: 1) 403 (Forbidden) - This indicates at least one of two conditions: 1)
the server does not allow the creation of collections at the given the server does not allow the creation of collections at the given
skipping to change at page 36, line 39 skipping to change at page 42, line 15
8.6 POST for Collections 8.6 POST for Collections
Since by definition the actual function performed by POST is Since by definition the actual function performed by POST is
determined by the server and often depends on the particular determined by the server and often depends on the particular
resource, the behavior of POST when applied to collections cannot be resource, the behavior of POST when applied to collections cannot be
meaningfully modified because it is largely undefined. Thus the meaningfully modified because it is largely undefined. Thus the
semantics of POST are unmodified when applied to a collection. semantics of POST are unmodified when applied to a collection.
8.7 DELETE 8.7 DELETE
Locks rooted on a resource MUST be destroyed in a successful DELETE
of that resource.
8.7.1 DELETE for Non-Collection Resources 8.7.1 DELETE for Non-Collection Resources
When a client issues a DELETE request to a Request-URI mapping to a When a client issues a DELETE request to a Request-URI mapping to a
non-collection resource, if the operation is successful the server non-collection resource, if the operation is successful the server
MUST remove that mapping. Thus, after a successful DELETE operation MUST remove that mapping. Thus, after a successful DELETE operation
(and in the absence of other actions) a subsequent GET/HEAD/PROPFIND (and in the absence of other actions) a subsequent GET/HEAD/PROPFIND
request to the target Request-URI MUST return 404 (Not Found). request to the target Request-URI MUST return 404 (Not Found).
8.7.2 DELETE for Collections 8.7.2 DELETE for Collections
skipping to change at page 37, line 29 skipping to change at page 43, line 6
If an error occurs deleting an internal resource (a resource other If an error occurs deleting an internal resource (a resource other
than the resource identified in the Request-URI) then the response than the resource identified in the Request-URI) then the response
can be a 207 (Multi-Status). Multi-Status is used here to indicate can be a 207 (Multi-Status). Multi-Status is used here to indicate
which internal resources could NOT be deleted, including an error which internal resources could NOT be deleted, including an error
code which should help the client understand which resources caused code which should help the client understand which resources caused
the failure. For example, the Multi-Status body could include a the failure. For example, the Multi-Status body could include a
response with status 423 (Locked) if an internal resource was locked. response with status 423 (Locked) if an internal resource was locked.
The server MAY return a 4xx status response, rather than a Multi- The server MAY return a 4xx status response, rather than a Multi-
Status, if the entire DELETE request failed and it canȔt identify Status, if the request failed.
the internal resources that caused the DELETE to fail.
424 (Failed Dependency) errors SHOULD NOT be in the 207 (Multi- 424 (Failed Dependency) errors SHOULD NOT be in the 207 (Multi-
Status). They can be safely left out because the client will know Status). They can be safely left out because the client will know
that the ancestors of a resource could not be deleted when the client that the ancestors of a resource could not be deleted when the client
receives an error for the ancestor's progeny. Additionally 204 (No receives an error for the ancestor's progeny. Additionally 204 (No
Content) errors SHOULD NOT be returned in the 207 (Multi- Status). Content) errors SHOULD NOT be returned in the 207 (Multi- Status).
The reason for this prohibition is that 204 (No Content) is the The reason for this prohibition is that 204 (No Content) is the
default success code. default success code.
8.7.3 Example - DELETE 8.7.3 Example - DELETE
skipping to change at page 38, line 26 skipping to change at page 43, line 37
Content-Length: xxxx Content-Length: xxxx
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<d:multistatus xmlns:d="DAV:"> <d:multistatus xmlns:d="DAV:">
<d:response> <d:response>
<d:href>http://www.example.com/container/resource3</d:href> <d:href>http://www.example.com/container/resource3</d:href>
<d:status>HTTP/1.1 423 Locked</d:status> <d:status>HTTP/1.1 423 Locked</d:status>
</d:response> </d:response>
</d:multistatus> </d:multistatus>
In this example the attempt to delete http://www.example.com/ In this example the attempt to delete
container/resource3 failed because it is locked, and no lock token http://www.example.com/container/resource3 failed because it is
was submitted with the request. Consequently, the attempt to delete locked, and no lock token was submitted with the request.
http://www.example.com/container/ also failed. Thus the client knows Consequently, the attempt to delete http://www.example.com/container/
that the attempt to delete http://www.example.com/container/ must also failed. Thus the client knows that the attempt to delete
have also failed since the parent can not be deleted unless its child http://www.example.com/container/ must have also failed since the
has also been deleted. Even though a Depth header has not been parent can not be deleted unless its child has also been deleted.
included, a depth of infinity is assumed because the method is on a Even though a Depth header has not been included, a depth of infinity
collection. is assumed because the method is on a collection.
8.8 PUT 8.8 PUT
8.8.1 PUT for Non-Collection Resources 8.8.1 PUT for Non-Collection Resources
A PUT performed on an existing resource replaces the GET response A PUT performed on an existing resource replaces the GET response
entity of the resource. Properties defined on the resource may be entity of the resource. Properties defined on the resource may be
recomputed during PUT processing but are not otherwise affected. For recomputed during PUT processing but are not otherwise affected. For
example, if a server recognizes the content type of the request body, example, if a server recognizes the content type of the request body,
it may be able to automatically extract information that could be it may be able to automatically extract information that could be
profitably exposed as properties. profitably exposed as properties.
A PUT that would result in the creation of a resource without an A PUT that would result in the creation of a resource without an
appropriately scoped parent collection MUST fail with a 409 appropriately scoped parent collection MUST fail with a 409
(Conflict). (Conflict).
8.8.2 PUT for Collections 8.8.2 PUT for Collections
As defined in RFC2616 [8], the "PUT method requests that the enclosed As defined in RFC2616 [7], the "PUT method requests that the enclosed
entity be stored under the supplied Request-URI." Since submission entity be stored under the supplied Request-URI." Since submission
of an entity representing a collection would implicitly encode of an entity representing a collection would implicitly encode
creation and deletion of resources, this specification intentionally creation and deletion of resources, this specification intentionally
does not define a transmission format for creating a collection using does not define a transmission format for creating a collection using
PUT. Instead, the MKCOL method is defined to create collections. PUT. Instead, the MKCOL method is defined to create collections. A
PUT request to an existing collection MAY be treated as an error (405
Method Not Allowed).
8.9 COPY 8.9 COPY
The COPY method creates a duplicate of the source resource, The COPY method creates a duplicate of the source resource identified
identified by the Request-URI, in the destination resource, by the Request-URI, in the destination resource identified by the URI
identified by the URI in the Destination header. The Destination in the Destination header. The Destination header MUST be present.
header MUST be present. The exact behavior of the COPY method The exact behavior of the COPY method depends on the type of the
depends on the type of the source resource. source resource. The state of the resource to be copied is fixed at
the point the server begins processing the COPY request.
All WebDAV compliant resources MUST support the COPY method. All WebDAV compliant resources MUST support the COPY method.
However, support for the COPY method does not guarantee the ability However, support for the COPY method does not guarantee the ability
to copy a resource. For example, separate programs may control to copy a resource. For example, separate programs may control
resources on the same server. As a result, it may not be possible to resources on the same server. As a result, it may not be possible to
copy a resource to a location that appears to be on the same server. copy a resource to a location that appears to be on the same server.
8.9.1 COPY for Non-collection Resources 8.9.1 COPY for Non-collection Resources
When the source resource is not a collection the result of the COPY When the source resource is not a collection the result of the COPY
skipping to change at page 40, line 21 skipping to change at page 45, line 33
The COPY method on a collection without a Depth header MUST act as if The COPY method on a collection without a Depth header MUST act as if
a Depth header with value "infinity" was included. A client may a Depth header with value "infinity" was included. A client may
submit a Depth header on a COPY on a collection with a value of "0" submit a Depth header on a COPY on a collection with a value of "0"
or "infinity". Servers MUST support the "0" and "infinity" Depth or "infinity". Servers MUST support the "0" and "infinity" Depth
header behaviors on WebDAV-compliant resources. header behaviors on WebDAV-compliant resources.
A COPY of depth infinity instructs that the collection resource A COPY of depth infinity instructs that the collection resource
identified by the Request-URI is to be copied to the location identified by the Request-URI is to be copied to the location
identified by the URI in the Destination header, and all its internal identified by the URI in the Destination header, and all its internal
member resources are to be copied to a location relative to it, member resources are to be copied to a location relative to it,
recursively through all levels of the collection hierarchy. recursively through all levels of the collection hierarchy. Servers
should of course avoid infinite recursion, and can do so by copying
the source resource as it existed at the point where processing
started.
A COPY of "Depth: 0" only instructs that the collection and its A COPY of "Depth: 0" only instructs that the collection and its
properties but not resources identified by its internal member URLs, properties but not resources identified by its internal member URLs,
are to be copied. are to be copied.
Any headers included with a COPY MUST be applied in processing every Any headers included with a COPY MUST be applied in processing every
resource to be copied with the exception of the Destination header. resource to be copied with the exception of the Destination header.
The Destination header only specifies the destination URI for the The Destination header only specifies the destination URI for the
Request-URI. When applied to members of the collection identified by Request-URI. When applied to members of the collection identified by
skipping to change at page 40, line 51 skipping to change at page 46, line 18
while copying an internal collection, the server MUST NOT copy any while copying an internal collection, the server MUST NOT copy any
resources identified by members of this collection (i.e., the server resources identified by members of this collection (i.e., the server
must skip this subtree), as this would create an inconsistent must skip this subtree), as this would create an inconsistent
namespace. After detecting an error, the COPY operation SHOULD try namespace. After detecting an error, the COPY operation SHOULD try
to finish as much of the original copy operation as possible (i.e., to finish as much of the original copy operation as possible (i.e.,
the server should still attempt to copy other subtrees and their the server should still attempt to copy other subtrees and their
members, that are not descendents of an error-causing collection). members, that are not descendents of an error-causing collection).
So, for example, if an infinite depth copy operation is performed on So, for example, if an infinite depth copy operation is performed on
collection /a/, which contains collections /a/b/ and /a/c/, and an collection /a/, which contains collections /a/b/ and /a/c/, and an
error occurs copying /a/b/, an attempt should still be made to copy / error occurs copying /a/b/, an attempt should still be made to copy
a/c/. Similarly, after encountering an error copying a non- /a/c/. Similarly, after encountering an error copying a non-
collection resource as part of an infinite depth copy, the server collection resource as part of an infinite depth copy, the server
SHOULD try to finish as much of the original copy operation as SHOULD try to finish as much of the original copy operation as
possible. possible.
If an error in executing the COPY method occurs with a resource other If an error in executing the COPY method occurs with a resource other
than the resource identified in the Request-URI then the response than the resource identified in the Request-URI then the response
MUST be a 207 (Multi-Status), and the URL of the resource causing the MUST be a 207 (Multi-Status), and the URL of the resource causing the
failure MUST appear with the specific error. failure MUST appear with the specific error.
The 424 (Failed Dependency) status code SHOULD NOT be returned in the The 424 (Failed Dependency) status code SHOULD NOT be returned in the
skipping to change at page 41, line 28 skipping to change at page 46, line 44
SHOULD NOT be returned as values in 207 (Multi-Status) responses from SHOULD NOT be returned as values in 207 (Multi-Status) responses from
COPY methods. They, too, can be safely omitted because they are the COPY methods. They, too, can be safely omitted because they are the
default success codes. default success codes.
8.9.4 COPY and the Overwrite Header 8.9.4 COPY and the Overwrite Header
If a resource exists at the destination and the Overwrite header is If a resource exists at the destination and the Overwrite header is
"T" then prior to performing the copy the server MUST perform a "T" then prior to performing the copy the server MUST perform a
DELETE with "Depth: infinity" on the destination resource. If the DELETE with "Depth: infinity" on the destination resource. If the
Overwrite header is set to "F" then the operation will fail. Overwrite header is set to "F" then the operation will fail.
(Extensions to WebDAV might not follow this rule to the letter but
must consider backwards compatibility with clients that expect COPY
to work this way.)
Interoperability testing has shown that some clients expect a
collection COPY to actually do a merge if a destination collection
exists. That behavior is appropriate for file system folders but not
necessarily for other data objects modelled as collections. Thus,
implementors are urged to comply with the standard language above,
and leave clients to perform a manual merge if that's the expected
behavior when copying a collection over another collection.
8.9.5 Status Codes 8.9.5 Status Codes
201 (Created) - The source resource was successfully copied. The 201 (Created) - The source resource was successfully copied. The
copy operation resulted in the creation of a new resource. copy operation resulted in the creation of a new resource.
204 (No Content) - The source resource was successfully copied to a 204 (No Content) - The source resource was successfully copied to a
pre-existing destination resource. pre-existing destination resource.
207 (Multi-Status) - Multiple resources were to be affected by the 207 (Multi-Status) - Multiple resources were to be affected by the
COPY, but errors on some of them prevented the operation from taking COPY, but errors on some of them prevented the operation from taking
place. Specific error messages, together with the most appropriate place. Specific error messages, together with the most appropriate
of the source and destination URLs, appear in the body of the multi- of the source and destination URLs, appear in the body of the multi-
status response. E.g. if a destination resource was locked and status response. E.g. if a destination resource was locked and could
could not be overwritten, then the destination resource URL appears not be overwritten, then the destination resource URL appears with
with the 423 (Locked) status. the 423 (Locked) status.
403 (Forbidden) - The operation is forbidden. Possibly this is 403 (Forbidden) - The operation is forbidden. Possibly this is
because the source and destination resources are the same resource. because the source and destination resources are the same resource.
409 (Conflict) - A resource cannot be created at the destination 409 (Conflict) - A resource cannot be created at the destination
until one or more intermediate collections have been created. The until one or more intermediate collections have been created. The
server MUST NOT create those intermediate collections automatically. server MUST NOT create those intermediate collections automatically.
412 (Precondition Failed) - A precondition failed, e.g. the 412 (Precondition Failed) - A precondition failed, e.g. the Overwrite
Overwrite header is "F" and the state of the destination resource is header is "F" and the state of the destination resource is non-null.
non-null.
423 (Locked) - The destination resource, or resource within the 423 (Locked) - The destination resource, or resource within the
destination collection, was locked. This response SHOULD contain the destination collection, was locked. This response SHOULD contain the
'missing-lock-token' precondition element. 'missing-lock-token' precondition element.
502 (Bad Gateway) - This may occur when the destination is on another 502 (Bad Gateway) - This may occur when the destination is on another
server, repository or namespace. Either the source namespace does server, repository or namespace. Either the source namespace does
not support copying to the destination namespace, or the destination not support copying to the destination namespace, or the destination
namespace refuses to accept the resource. The client may wish to try namespace refuses to accept the resource. The client may wish to try
GET/PUT and PROPFIND/PROPPATCH instead. GET/PUT and PROPFIND/PROPPATCH instead.
507 (Insufficient Storage) - The destination resource does not have 507 (Insufficient Storage) - The destination resource does not have
sufficient space to record the state of the resource after the sufficient space to record the state of the resource after the
execution of this method. execution of this method.
8.9.6 COPY Examples 8.9.6 COPY Examples
This example shows resource http://www.ics.uci.edu/~fielding/ This example shows resource
index.html being copied to the location http://www.ics.uci.edu/users/ http://www.ics.uci.edu/~fielding/index.html being copied to the
f/fielding/index.html. The 204 (No Content) status code indicates location http://www.ics.uci.edu/users/f/fielding/index.html. The 204
the existing resource at the destination was overwritten. (No Content) status code indicates the existing resource at the
destination was overwritten.
COPY with Overwrite COPY with Overwrite
>>Request >>Request
COPY /~fielding/index.html HTTP/1.1 COPY /~fielding/index.html HTTP/1.1
Host: www.ics.uci.edu Host: www.ics.uci.edu
Destination: http://www.ics.uci.edu/users/f/fielding/index.html Destination: http://www.ics.uci.edu/users/f/fielding/index.html
>>Response >>Response
skipping to change at page 46, line 29 skipping to change at page 52, line 14
status response. E.g. if a source resource was locked and could not status response. E.g. if a source resource was locked and could not
be moved, then the source resource URL appears with the 423 (Locked) be moved, then the source resource URL appears with the 423 (Locked)
status. status.
403 (Forbidden) - The source and destination resources are the same. 403 (Forbidden) - The source and destination resources are the same.
409 (Conflict) - A resource cannot be created at the destination 409 (Conflict) - A resource cannot be created at the destination
until one or more intermediate collections have been created. The until one or more intermediate collections have been created. The
server MUST NOT create those intermediate collections automatically. server MUST NOT create those intermediate collections automatically.
Or, the server was unable to preserve the behavior of the live Or, the server was unable to preserve the behavior of the live
properties and still move the resource to the destination (see properties and still move the resource to the destination (see 'live-
'live-properties-not-preserved' postcondition). properties-not-preserved' postcondition).
412 (Precondition Failed) Ș A condition failed, e.g. the Overwrite 412 (Precondition Failed) n A condition failed, e.g. the Overwrite
header is "F" and the state of the destination resource is non-null. header is "F" and the state of the destination resource is non-null.
423 (Locked) - The source or the destination resource, or some 423 (Locked) - The source or the destination resource, or some
resource within the source or destination collection, was locked. resource within the source or destination collection, was locked.
This response SHOULD contain the 'missing-lock-token' precondition This response SHOULD contain the 'missing-lock-token' precondition
element. element.
502 (Bad Gateway) - This may occur when the destination is on another 502 (Bad Gateway) - This may occur when the destination is on another
server and the destination server refuses to accept the resource. server and the destination server refuses to accept the resource.
This could also occur when the destination is on another sub-section This could also occur when the destination is on another sub-section
of the same server namespace. of the same server namespace.
8.10.5 Examples 8.10.5 Examples
This example shows resource http://www.ics.uci.edu/~fielding/ This example shows resource
index.html being moved to the location http://www.ics.uci.edu/users/ http://www.ics.uci.edu/~fielding/index.html being moved to the
f/fielding/index.html. The contents of the destination resource location http://www.ics.uci.edu/users/f/fielding/index.html. The
would have been overwritten if the destination resource had been contents of the destination resource would have been overwritten if
non-null. In this case, since there was nothing at the destination the destination resource had been non-null. In this case, since
resource, the response code is 201 (Created). there was nothing at the destination resource, the response code is
201 (Created).
MOVE of a Non-Collection MOVE of a Non-Collection
>>Request >>Request
MOVE /~fielding/index.html HTTP/1.1 MOVE /~fielding/index.html HTTP/1.1
Host: www.ics.uci.edu Host: www.ics.uci.edu
Destination: http://www.ics.uci.edu/users/f/fielding/index.html Destination: http://www.ics.uci.edu/users/f/fielding/index.html
>>Response >>Response
skipping to change at page 47, line 48 skipping to change at page 53, line 33
<d:response> <d:response>
<d:href>http://www.example.com/othercontainer/C2/</d:href> <d:href>http://www.example.com/othercontainer/C2/</d:href>
<d:status>HTTP/1.1 423 Locked</d:status> <d:status>HTTP/1.1 423 Locked</d:status>
</d:response> </d:response>
</d:multistatus> </d:multistatus>
In this example the client has submitted a number of lock tokens with In this example the client has submitted a number of lock tokens with
the request. A lock token will need to be submitted for every the request. A lock token will need to be submitted for every
resource, both source and destination, anywhere in the scope of the resource, both source and destination, anywhere in the scope of the
method, that is locked. In this case the proper lock token was not method, that is locked. In this case the proper lock token was not
submitted for the destination http://www.example.com/othercontainer/ submitted for the destination
C2/. This means that the resource /container/C2/ could not be moved. http://www.example.com/othercontainer/C2/. This means that the
Because there was an error moving /container/C2/, none of /container/ resource /container/C2/ could not be moved. Because there was an
C2's members were moved. However no errors were listed for those error moving /container/C2/, none of /container/C2's members were
members due to the error minimization rules. User agent moved. However no errors were listed for those members due to the
authentication has previously occurred via a mechanism outside the error minimization rules. User agent authentication has previously
scope of the HTTP protocol, in an underlying transport layer. occurred via a mechanism outside the scope of the HTTP protocol, in
an underlying transport layer.
8.11 LOCK Method 8.11 LOCK Method
The following sections describe the LOCK method, which is used to The following sections describe the LOCK method, which is used to
take out a lock of any access type and to refresh an existing lock. take out a lock of any access type and to refresh an existing lock.
These sections on the LOCK method describe only those semantics that These sections on the LOCK method describe only those semantics that
are specific to the LOCK method and are independent of the access are specific to the LOCK method and are independent of the access
type of the lock being requested. type of the lock being requested.
Any resource which supports the LOCK method MUST, at minimum, support Any resource which supports the LOCK method MUST, at minimum, support
skipping to change at page 48, line 34 skipping to change at page 54, line 20
information for this lock request. The server MUST preserve the information for this lock request. The server MUST preserve the
information provided by the client in the owner field when the lock information provided by the client in the owner field when the lock
information is requested. The LOCK request MAY have a Timeout information is requested. The LOCK request MAY have a Timeout
header. header.
Clients MUST assume that locks may arbitrarily disappear at any time, Clients MUST assume that locks may arbitrarily disappear at any time,
regardless of the value given in the Timeout header. The Timeout regardless of the value given in the Timeout header. The Timeout
header only indicates the behavior of the server if extraordinary header only indicates the behavior of the server if extraordinary
circumstances do not occur. For example, a sufficiently privileged circumstances do not occur. For example, a sufficiently privileged
user may remove a lock at any time or the system may crash in such a user may remove a lock at any time or the system may crash in such a
way that it loses the record of the lock's existence. The response way that it loses the record of the lock's existence.
MUST contain the value of the lockdiscovery property in a prop XML
element.
A success response to a LOCK request MUST include the Lock-Token
response header with the token associated with the new lock, and MUST
contain a body with the value of the 'lockdiscovery' property. Note
that the Lock-Token header would not be returned in the response for
a successful refresh LOCK request because a new lock was not created.
The scope of a lock is the entire state of the resource, including
its body and associated properties. As a result, a lock on a
resource MUST also lock the resource's properties.
For collections, a lock also affects the ability to add or remove
members. The nature of the effect depends upon the type of access
control involved. This means that if a collection is locked, its
lock-token is required in all these cases:
o DELETE a collection's direct internal member When a new lock is created, the LOCK response:
o MOVE a member out of the collection
o MOVE a member into the collection, unless it overwrites a pre-
existing member
o MOVE to rename it within a collection,
o COPY a member into a collection, unless it overwrites a pre-
existing member
o PUT or MKCOL request which would create a new member.
The collection's lock token is required in addition to the lock token MUST contain a body with the value of the lockdiscovery property
on the internal member itself, if it exists. in a prop XML element.
The interaction of a LOCK with various methods is dependent upon the MUST include the Lock-Token response header with the token
lock type. However, independent of lock type, a successful DELETE of associated with the new lock.
a resource MUST cause all of its direct locks to be removed.
8.11.1 Refreshing Locks 8.11.1 Refreshing Locks
A lock is refreshed by sending a LOCK request without a body to a A lock is refreshed by sending a LOCK request without a body to a
resource within the scope of the lock. A LOCK request to refresh a resource within the scope of the lock. A LOCK request to refresh a
lock must specify which lock to refresh by using the Lock-Token lock must specify which lock to refresh by using the Lock-Token
header with a single lock token (only one lock may be refreshed at a header with a single lock token (only one lock may be refreshed at a
time). This request MUST NOT contain a body, but it may contain a time). This request MUST NOT contain a body, but it may contain a
Timeout header. A server MAY accept the Timeout header to change the Timeout header. A server MAY accept the Timeout header to change the
duration remaining on the lock to the new value. A server MUST duration remaining on the lock to the new value. A server MUST
skipping to change at page 49, line 43 skipping to change at page 55, line 5
If the resource has other (shared) locks, those locks are unaffected If the resource has other (shared) locks, those locks are unaffected
by a lock refresh. Additionally, those locks do not prevent the by a lock refresh. Additionally, those locks do not prevent the
named lock from being refreshed. named lock from being refreshed.
Note that in RFC2518, clients were indicated through the example in Note that in RFC2518, clients were indicated through the example in
the text to use the If header to specify what lock to refresh (rather the text to use the If header to specify what lock to refresh (rather
than the Lock-Token header). Servers are encouraged to continue to than the Lock-Token header). Servers are encouraged to continue to
support this as well as the Lock-Token header. support this as well as the Lock-Token header.
Note that the Lock-Token header is not be returned in the response
for a successful refresh LOCK request, but the LOCK response body
MUST contain the new value for the lockdiscovery body.
8.11.2 Depth and Locking 8.11.2 Depth and Locking
The Depth header may be used with the LOCK method. Values other than The Depth header may be used with the LOCK method. Values other than
0 or infinity MUST NOT be used with the Depth header on a LOCK 0 or infinity MUST NOT be used with the Depth header on a LOCK
method. All resources that support the LOCK method MUST support the method. All resources that support the LOCK method MUST support the
Depth header. Depth header.
A Depth header of value 0 means to just lock the resource specified A Depth header of value 0 means to just lock the resource specified
by the Request-URI. by the Request-URI.
skipping to change at page 50, line 38 skipping to change at page 56, line 11
empty resource, either by using a 204 No Content response, or by empty resource, either by using a 204 No Content response, or by
using 200 OK with a Content-Length header indicating zero length and using 200 OK with a Content-Length header indicating zero length and
no Content-Type. no Content-Type.
8.11.4 Lock Compatibility Table 8.11.4 Lock Compatibility Table
The table below describes the behavior that occurs when a lock The table below describes the behavior that occurs when a lock
request is made on a resource. request is made on a resource.
Current State Shared Lock Request Exclusive Lock Request Current State Shared Lock Request Exclusive Lock Request
-------------------------------------------------------------------- ----------------------------------------------------------------
None True True None True True
Shared Lock True False Shared Lock True False
Exclusive Lock False False* Exclusive Lock False False*
Legend: True = lock may be granted. False = lock MUST NOT be Legend: True = lock may be granted. False = lock MUST NOT be
granted. *=It is illegal for a principal to request the same lock granted. *=It is illegal for a principal to request the same lock
twice. twice.
The current lock state of a resource is given in the leftmost column, The current lock state of a resource is given in the leftmost column,
and lock requests are listed in the first row. The intersection of a and lock requests are listed in the first row. The intersection of a
skipping to change at page 51, line 16 skipping to change at page 56, line 36
8.11.5 LOCK responses 8.11.5 LOCK responses
200 (OK) - The lock request succeeded and the value of the 200 (OK) - The lock request succeeded and the value of the
lockdiscovery property is included in the body. lockdiscovery property is included in the body.
409 (Conflict) - A resource cannot be created at the destination 409 (Conflict) - A resource cannot be created at the destination
until one or more intermediate collections have been created. The until one or more intermediate collections have been created. The
server MUST NOT create those intermediate collections automatically. server MUST NOT create those intermediate collections automatically.
412 (Precondition Failed) - The included lock token was not
enforceable on this resource or the server could not satisfy the
request in the lockinfo XML element.
423 (Locked) - The resource is locked already. For consistency's 423 (Locked) - The resource is locked already. For consistency's
sake, this response SHOULD contain the 'missing-lock-token' sake, this response SHOULD contain the 'missing-lock-token'
precondition element. precondition element.
400 (Bad Request), with 'request-uri-must-match-lock-token' h 400 (Bad Request), with 'request-uri-must-match-lock-token'
precondition - The LOCK request was made with a Lock-Token header, precondition - The LOCK request was made with a Lock-Token header,
indicating that the client wishes to refresh the given lock. indicating that the client wishes to refresh the given lock.
However, the Request-URI did not fall within the scope of the lock However, the Request-URI did not fall within the scope of the lock
identified by the token. The lock may have a scope that does not identified by the token. The lock may have a scope that does not
include the Request-URI, or the lock could have disappeared, or the include the Request-URI, or the lock could have disappeared, or the
token may be invalid. token may be invalid.
424 (Failed Dependency) - This may appear inside a 207 response to a
LOCK request, to indicate that a resource could not be locked because
of a failure on another resource.
8.11.6 Example - Simple Lock Request 8.11.6 Example - Simple Lock Request
>>Request >>Request
LOCK /workspace/webdav/proposal.doc HTTP/1.1 LOCK /workspace/webdav/proposal.doc HTTP/1.1
Host: example.com Host: example.com
Timeout: Infinite, Second-4100000000 Timeout: Infinite, Second-4100000000
Content-Type: text/xml; charset="utf-8" Content-Type: text/xml; charset="utf-8"
Content-Length: xxxx Content-Length: xxxx
Authorization: Digest username="ejw", Authorization: Digest username="ejw",
skipping to change at page 52, line 42 skipping to change at page 58, line 14
<D:href>http://example.com/workspace/webdav <D:href>http://example.com/workspace/webdav
/proposal.doc</D:href> /proposal.doc</D:href>
</D:lockroot> </D:lockroot>
</D:activelock> </D:activelock>
</D:lockdiscovery> </D:lockdiscovery>
</D:prop> </D:prop>
This example shows the successful creation of an exclusive write lock This example shows the successful creation of an exclusive write lock
on resource http://example.com/workspace/webdav/proposal.doc. The on resource http://example.com/workspace/webdav/proposal.doc. The
resource http://www.ics.uci.edu/~ejw/contact.html contains contact resource http://www.ics.uci.edu/~ejw/contact.html contains contact
information for the owner of the lock. The server has an information for the owner of the lock. The server has an activity-
activity-based timeout policy in place on this resource, which causes based timeout policy in place on this resource, which causes the lock
the lock to automatically be removed after 1 week (604800 seconds). to automatically be removed after 1 week (604800 seconds). Note that
Note that the nonce, response, and opaque fields have not been the nonce, response, and opaque fields have not been calculated in
calculated in the Authorization request header. the Authorization request header.
Note that the locktoken and lockroot href elements would not contain Note that the locktoken and lockroot href elements would not contain
any whitespace. The line return appearing in this document is only any whitespace. The line return appearing in this document is only
for formatting. for formatting.
8.11.7 Example - Refreshing a Write Lock 8.11.7 Example - Refreshing a Write Lock
>>Request >>Request
LOCK /workspace/webdav/proposal.doc HTTP/1.1 LOCK /workspace/webdav/proposal.doc HTTP/1.1
skipping to change at page 55, line 11 skipping to change at page 61, line 11
</D:propstat> </D:propstat>
</D:response> </D:response>
</D:multistatus> </D:multistatus>
This example shows a request for an exclusive write lock on a This example shows a request for an exclusive write lock on a
collection and all its children. In this request, the client has collection and all its children. In this request, the client has
specified that it desires an infinite length lock, if available, specified that it desires an infinite length lock, if available,
otherwise a timeout of 4.1 billion seconds, if available. The otherwise a timeout of 4.1 billion seconds, if available. The
request entity body contains the contact information for the request entity body contains the contact information for the
principal taking out the lock, in this case a web page URL. principal taking out the lock, in this case a web page URL.
The error is a 403 (Forbidden) response on the resource http:// The error is a 403 (Forbidden) response on the resource
example.com/webdav/secret. Because this resource could not be http://example.com/webdav/secret. Because this resource could not be
locked, none of the resources were locked. Note also that the locked, none of the resources were locked. Note also that the
lockdiscovery property for the Request-URI has been included as lockdiscovery property for the Request-URI has been included as
required. In this example the lockdiscovery property is empty which required. In this example the lockdiscovery property is empty which
means that there are no outstanding locks on the resource. means that there are no outstanding locks on the resource.
In this example, the nonce, response, and opaque fields have not been In this example, the nonce, response, and opaque fields have not been
calculated in the Authorization request header. calculated in the Authorization request header.
8.12 UNLOCK Method 8.12 UNLOCK Method
skipping to change at page 55, line 45 skipping to change at page 61, line 45
A successful response to an UNLOCK method does not mean that the A successful response to an UNLOCK method does not mean that the
resource is necessarily unlocked. It means that the specific lock resource is necessarily unlocked. It means that the specific lock
corresponding to the specified token no longer exists. corresponding to the specified token no longer exists.
Any DAV compliant resource which supports the LOCK method MUST Any DAV compliant resource which supports the LOCK method MUST
support the UNLOCK method. support the UNLOCK method.
8.12.1 Status Codes 8.12.1 Status Codes
204 (No Content) - Normal success response 204 (No Content) - Normal success response (rather than 200 OK, since
200 OK would imply a response body, and an UNLOCK success response
does not normally contain a body)
400 (Bad Request) - No lock token was provided (see 400 (Bad Request) - No lock token was provided (see 'missing-lock-
'missing-lock-token' precondition), or request was made to a token' precondition), or request was made to a Request-URI that was
Request-URI that was not within the scope of the lock (see not within the scope of the lock (see 'requesturi-must-match-lock-
'requesturi-must-match-lock-token' precondition). token' precondition).
403 (Forbidden) - The currently authenticated principal does not have 403 (Forbidden) - The currently authenticated principal does not have
permission to remove the lock (the server SHOULD use the permission to remove the lock (the server SHOULD use the 'need-
'need-privileges' precondition element). privileges' precondition element).
412 (Precondition Failed) - The resource was not locked. 412 (Precondition Failed) - The resource was not locked.
8.12.2 Example 8.12.2 Example
>>Request >>Request
UNLOCK /workspace/webdav/info.doc HTTP/1.1 UNLOCK /workspace/webdav/info.doc HTTP/1.1
Host: example.com Host: example.com
Lock-Token: <opaquelocktoken:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7> Lock-Token: <opaquelocktoken:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7>
skipping to change at page 56, line 29 skipping to change at page 62, line 30
realm="ejw@example.com", nonce="...", realm="ejw@example.com", nonce="...",
uri="/workspace/webdav/proposal.doc", uri="/workspace/webdav/proposal.doc",
response="...", opaque="..." response="...", opaque="..."
>>Response >>Response
HTTP/1.1 204 No Content HTTP/1.1 204 No Content
In this example, the lock identified by the lock token In this example, the lock identified by the lock token
"opaquelocktoken:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7" is "opaquelocktoken:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7" is
successfully removed from the resource http://example.com/workspace/ successfully removed from the resource
webdav/info.doc. If this lock included more than just one resource, http://example.com/workspace/webdav/info.doc. If this lock included
the lock is removed from all resources included in the lock. The 204 more than just one resource, the lock is removed from all resources
(No Content) status code is used instead of 200 (OK) because there is included in the lock. The 204 (No Content) status code is used
no response entity body. instead of 200 (OK) because there is no response entity body.
In this example, the nonce, response, and opaque fields have not been In this example, the nonce, response, and opaque fields have not been
calculated in the Authorization request header. calculated in the Authorization request header.
9. HTTP Headers for Distributed Authoring 9. HTTP Headers for Distributed Authoring
All DAV headers follow the same basic formatting rules as HTTP All DAV headers follow the same basic formatting rules as HTTP
headers. This includes rules like line continuation and how to headers. This includes rules like line continuation and how to
combine (or separate) multiple instances of the same header using combine (or separate) multiple instances of the same header using
commas. commas.
skipping to change at page 59, line 21 skipping to change at page 65, line 17
method should fail not because the resource doesn't have internal method should fail not because the resource doesn't have internal
members, but because of the illegal value in the header. members, but because of the illegal value in the header.
9.3 Destination Header 9.3 Destination Header
Destination = "Destination" ":" ( absoluteURI ) Destination = "Destination" ":" ( absoluteURI )
The Destination request header specifies the URI which identifies a The Destination request header specifies the URI which identifies a
destination resource for methods such as COPY and MOVE, which take destination resource for methods such as COPY and MOVE, which take
two URIs as parameters. Note that the absoluteURI production is two URIs as parameters. Note that the absoluteURI production is
defined in RFC2396 [6]. defined in RFC2396 [5].
If the Destination value is an absolute URI, it may name a different If the Destination value is an absolute URI, it may name a different
server (or different port or scheme). If the source server cannot server (or different port or scheme). If the source server cannot
attempt a copy to the remote server, it MUST fail the request with a attempt a copy to the remote server, it MUST fail the request with a
502 (Bad Gateway) response. Servers MAY attempt to copy the resource 502 (Bad Gateway) response. Servers MAY attempt to copy the resource
to the remote server using PUT/PROPPATCH or another mechanism. to the remote server using PUT/PROPPATCH or another mechanism.
9.4 Force-Authentication Header 9.4 Force-Authentication Header
Force-Authentication = "Force-Authentication" ":" Method Force-Authentication = "Force-Authentication" ":" Method
The Force-Authentication request header is used with the OPTIONS The Force-Authentication request header is used with the OPTIONS
method to specify that the client wants to be challenged for method to specify that the client wants to be challenged for
authentication credentials to the resource identified by the authentication credentials to the resource identified by the Request-
Request-URI. If present on a request to a WebDAV-compliant resource, URI. If present on a request to a WebDAV-compliant resource, the
the server MUST respond with either 401 (Unauthorized) or 501 (Not server MUST respond with either 401 (Unauthorized) or 501 (Not
Implemented) status code. The Method value is used for the client to Implemented) status code. The Method value is used for the client to
indicate what method it intends to use first on the resource indicate what method it intends to use first on the resource
identified in the Request-URI. identified in the Request-URI.
9.5 If Header 9.5 If Header
If = "If" ":" ( 1*No-tag-list | 1*Tagged-list) If = "If" ":" ( 1*No-tag-list | 1*Tagged-list)
No-tag-list = List No-tag-list = List
Tagged-list = Resource 1*List Tagged-list = Resource 1*List
Resource = Coded-URL Resource = Coded-URL
List = #( "(" List | Clause ")" ) List = #( "(" List | Clause ")" )
Clause = ["Not"] State-token | State-token Clause = ["Not"] State-token | State-token
State-token = Coded-URL | "[" entity-tag "]" State-token = Coded-URL | "[" entity-tag "]"
Coded-URL = "<" absoluteURI ">" Coded-URL = "<" absoluteURI ">"
The If request header is intended to have similar functionality to The If request header is intended to have similar functionality to
the If- Match header defined in section 14.24 of RFC2616 [8]. the If-Match header defined in section 14.24 of RFC2616 [7]. However
However the If header is intended for use with any URI which the If header is intended for use with any URI which represents state
represents state information, referred to as a state token, about a information, referred to as a state token, about a resource as well
resource as well as ETags. A typical example of a state token is a as ETags. A typical example of a state token is a lock token, and
lock token, and lock tokens are the only state tokens defined in this lock tokens are the only state tokens defined in this specification.
specification. The <DAV:no-lock> state token is a special token that The <DAV:no-lock> state token is a special token that must never
must never match an actual valid lock token. The purpose of this is match an actual valid lock token. The purpose of this is described
described in section 9.5.5. in section 9.5.5.
The If header's purpose is to describe a series of state lists. If The If header's purpose is to describe a series of state lists. If
the state of the resource to which the header is applied does not the state of the resource to which the header is applied does not
match any of the specified state lists then the request MUST fail match any of the specified state lists then the request MUST fail
with a 412 (Precondition Failed). If one of the described state with a 412 (Precondition Failed). If one of the described state
lists matches the state of the resource then the request may succeed. lists matches the state of the resource then the request may succeed.
The server must parse the If header when it appears on any request, The server must parse the If header when it appears on any request,
evaluate all the clauses, and if the conditional evaluates to false, evaluate all the clauses, and if the conditional evaluates to false,
fail the request. fail the request.
Note that the absoluteURI production is defined in RFC2396 [6]. Note that the absoluteURI production is defined in RFC2396 [5].
RFC2518 originally defined the If header without comma separators. RFC2518 originally defined the If header without comma separators.
This oversight meant that the If header couldn't be divided up among This oversight meant that the If header couldn't be divided up among
multiple lines according to the HTTP header manipulation rules. multiple lines according to the HTTP header manipulation rules.
Servers supporting "bis" MUST be able to accept commas in If header Servers supporting "bis" MUST be able to accept commas in If header
values. If the header has commas between tokens or clauses, the values. If the header has commas between tokens or clauses, the
header can be evaluated simply by removing the commas and proceeding header can be evaluated simply by removing the commas and proceeding
with the evaluation rules. with the evaluation rules.
9.5.1 No-tag-list Production 9.5.1 No-tag-list Production
skipping to change at page 61, line 20 skipping to change at page 67, line 7
The previous header would require that the resource identified in the The previous header would require that the resource identified in the
Request-URI be locked with the specified lock token and in the state Request-URI be locked with the specified lock token and in the state
identified by the "I am an ETag" ETag or in the state identified by identified by the "I am an ETag" ETag or in the state identified by
the second ETag "I am another ETag". To put the matter more plainly the second ETag "I am another ETag". To put the matter more plainly
one can think of the previous If header as being in the form (or (and one can think of the previous If header as being in the form (or (and
<opaquelocktoken:a-write-lock-token> ["I am an ETag"]) (and ["I am <opaquelocktoken:a-write-lock-token> ["I am an ETag"]) (and ["I am
another ETag"])). another ETag"])).
9.5.2 Tagged-list Production 9.5.2 Tagged-list Production
The tagged-list production scopes a list production. That is, it The tagged-list production may be used instead of the no-tag-list
specifies that the lists following the resource specification only production, in order to scope each token to a specific resource.
apply to the specified resource. The scope of the resource That is, it specifies that the lists following the resource
production begins with the list production immediately following the specification only apply to the specified resource. The scope of the
resource production and ends with the next resource production, if resource production begins with the list production immediately
any. All clauses must be evaluated. If the state of the resource following the resource production and ends with the next resource
named in the tag does not match any of the associated state lists production, if any. All clauses must be evaluated. If the state of
then the request MUST fail with a 412 (Precondition Failed). the resource named in the tag does not match any of the associated
state lists then the request MUST fail with a 412 (Precondition
Failed). The tagged-list production MUST NOT be used together with
the no-tag-list production, either in the same If header or in a
continuation.
The same URI MUST NOT appear more than once in a resource production The same URI MUST NOT appear more than once in a resource production
in an If header. in an If header.
Example - Tagged List If header Example - Tagged List If header
COPY /resource1 HTTP/1.1 COPY /resource1 HTTP/1.1
Host: www.example.com Host: www.example.com
Destination: http://www.example.com/resource2 Destination: http://www.example.com/resource2
If: <http://www.example.com/resource1> (<locktoken:a-write-lock- If: <http://www.example.com/resource1> (<locktoken:a-write-lock-
token> [W/"A weak ETag"]), (["strong ETag"]), token> [W/"A weak ETag"]), (["strong ETag"]),
<http://www.bar.bar/random>(["another strong ETag"]) <http://www.bar.bar/random>(["another strong ETag"])
In this example http://www.example.com/resource1 is being copied to In this example http://www.example.com/resource1 is being copied to
http://www.example.com/resource2. When the method is first applied http://www.example.com/resource2. When the method is first applied
to http://www.example.com/resource1, resource1 must be in the state to http://www.example.com/resource1, resource1 must be in the state
specified by "(<locktoken:a-write-lock-token> [W/"A weak ETag"]) specified by "(<locktoken:a-write-lock-token> [W/"A weak ETag"])
(["strong ETag"])", that is, it either must be locked with a lock (["strong ETag"])", that is, it either must be locked with a lock
token of "locktoken:a-write-lock-token" and have a weak entity tag W/ token of "locktoken:a-write-lock-token" and have a weak entity tag
"A weak ETag" or it must have a strong entity tag "strong ETag". W/"A weak ETag" or it must have a strong entity tag "strong ETag".
That is the only success condition since the resource http:// That is the only success condition since the resource
www.bar.bar/random never has the method applied to it (the only other http://www.bar.bar/random never has the method applied to it (the
resource listed in the If header) and http://www.example.com/ only other resource listed in the If header) and
resource2 is not listed in the If header. http://www.example.com/resource2 is not listed in the If header.
9.5.3 Not Production 9.5.3 Not Production
Every state token or ETag is either current, and hence describes the Every state token or ETag is either current, and hence describes the
state of a resource, or is not current, and does not describe the state of a resource, or is not current, and does not describe the
state of a resource. The boolean operation of matching a state token state of a resource. The boolean operation of matching a state token
or ETag to the current state of a resource thus resolves to a true or or ETag to the current state of a resource thus resolves to a true or
false value. The "Not" production is used to reverse that value. false value. The "Not" production is used to reverse that value.
The scope of the not production is the state-token or entity-tag The scope of the not production is the state-token or entity-tag
immediately following it. immediately following it.
skipping to change at page 65, line 8 skipping to change at page 71, line 8
user may be planning on going off-line. user may be planning on going off-line.
A client MUST NOT assume that just because the time-out has expired A client MUST NOT assume that just because the time-out has expired
the lock has been lost. Likewise, a client MUST NOT assume that just the lock has been lost. Likewise, a client MUST NOT assume that just
because the time-out has not expired, the lock still exists (and for because the time-out has not expired, the lock still exists (and for
this reason, clients are strongly advised to use ETags as well). this reason, clients are strongly advised to use ETags as well).
10. Status Code Extensions to HTTP/1.1 10. Status Code Extensions to HTTP/1.1
The following status codes are added to those defined in HTTP/1.1 The following status codes are added to those defined in HTTP/1.1
RFC2616 [8]. RFC2616 [7].
10.1 102 Processing 10.1 102 Processing
The 102 (Processing) status code is an interim response used to The 102 (Processing) status code is an interim response used to
inform the client that the server has accepted the complete request, inform the client that the server has accepted the complete request,
but has not yet completed it. This status code SHOULD only be sent but has not yet completed it. This status code SHOULD only be sent
when the server has a reasonable expectation that the request will when the server has a reasonable expectation that the request will
take significant time to complete. As guidance, if a method is take significant time to complete. As guidance, if a method is
taking longer than 20 seconds (a reasonable, but arbitrary value) to taking longer than 20 seconds (a reasonable, but arbitrary value) to
process the server SHOULD return a 102 (Processing) response. The process the server SHOULD return a 102 (Processing) response. The
skipping to change at page 65, line 48 skipping to change at page 71, line 48
415(Unsupported Media Type) status code is inappropriate), and the 415(Unsupported Media Type) status code is inappropriate), and the
syntax of the request entity is correct (thus a 400 (Bad Request) syntax of the request entity is correct (thus a 400 (Bad Request)
status code is inappropriate) but was unable to process the contained status code is inappropriate) but was unable to process the contained
instructions. For example, this error condition may occur if an XML instructions. For example, this error condition may occur if an XML
request body contains well-formed (i.e., syntactically correct), but request body contains well-formed (i.e., syntactically correct), but
semantically erroneous XML instructions. semantically erroneous XML instructions.
10.4 423 Locked 10.4 423 Locked
The 423 (Locked) status code means the source or destination resource The 423 (Locked) status code means the source or destination resource
of a method is locked. This response SHOULD contain the of a method is locked. This response SHOULD contain the 'missing-
'missing-lock-token' element and corresponding href in the error lock-token' element and corresponding href in the error body.
body.
10.5 424 Failed Dependency 10.5 424 Failed Dependency
The 424 (Failed Dependency) status code means that the method could The 424 (Failed Dependency) status code means that the method could
not be performed on the resource because the requested action not be performed on the resource because the requested action
depended on another action and that action failed. For example, if a depended on another action and that action failed. For example, if a
command in a PROPPATCH method fails then, at minimum, the rest of the command in a PROPPATCH method fails then, at minimum, the rest of the
commands will also fail with 424 (Failed Dependency). commands will also fail with 424 (Failed Dependency).
10.6 507 Insufficient Storage 10.6 507 Insufficient Storage
skipping to change at page 67, line 7 skipping to change at page 73, line 7
The 507 (Insufficient Storage) status code means the method could not The 507 (Insufficient Storage) status code means the method could not
be performed on the resource because the server is unable to store be performed on the resource because the server is unable to store
the representation needed to successfully complete the request. This the representation needed to successfully complete the request. This
condition is considered to be temporary. If the request which condition is considered to be temporary. If the request which
received this status code was the result of a user action, the received this status code was the result of a user action, the
request MUST NOT be repeated until it is requested by a separate user request MUST NOT be repeated until it is requested by a separate user
action. action.
11. Use of HTTP Status Codes 11. Use of HTTP Status Codes
These HTTP codes are not redefined, but this section serves as a
reminder that these HTTP codes may be used in responses to WebDAV
methods and clients must be appropriately prepared to handle them.
11.1 301 Moved Permanently 11.1 301 Moved Permanently
Any WebDAV request may be redirected using this status code. Any WebDAV request may be redirected using this status code.
11.2 302 Found 11.2 302 Found
Any WebDAV request may be redirected using this status code. Any WebDAV request may be redirected using this status code.
11.3 400 Bad Request 11.3 400 Bad Request
skipping to change at page 67, line 38 skipping to change at page 73, line 45
collection. collection.
11.5 409 Conflict 11.5 409 Conflict
The 409 Conflict is most typically returned when a method that The 409 Conflict is most typically returned when a method that
attempts to create a new resource must fail, because one of the attempts to create a new resource must fail, because one of the
collections that resource depends on does not exist. However, other collections that resource depends on does not exist. However, other
types of conflicts are defined in specifications extending RFC2518. types of conflicts are defined in specifications extending RFC2518.
Therefore, this can be returned in response to all methods. Therefore, this can be returned in response to all methods.
11.6 414 Request-URI Too Long 11.6 412 Precondition Failed
Any request may contain a conditional header defined in HTTP (If-
Match, If-Modified-Since, etc.) or the "If" conditional header
defined in this specification. If the request contains a conditional
header, and if that condition fails to hold, then this error code may
be returned. This status code is not typically appropriate if the
client did not include a conditional header in the request.
11.7 414 Request-URI Too Long
This status code is used in HTTP 1.1 only for Request-URIs, because This status code is used in HTTP 1.1 only for Request-URIs, because
full URIs arenȔt used in other headers. WebDAV specifies full URLs full URIs arenit used in other headers. WebDAV specifies full URLs
in other headers, therefore this error may be used if the URI is too in other headers, therefore this error may be used if the URI is too
long in other locations as well. This status code may be used in long in other locations as well. This status code may be used in
response to any method in this specification. response to any method in this specification.
11.8 503 Service Unavailable
This status code is particularly useful to respond to requests that
the server considers a denial-of-service attack, such as excessively
large PROPFIND depth infinity requests or requests in quick
succession.
12. Multi-Status Response 12. Multi-Status Response
The default 207 (Multi-Status) response body is a text/xml or The default 207 (Multi-Status) response body is a text/xml or
application/xml HTTP entity that contains a single XML element called application/xml HTTP entity that contains a single XML element called
multistatus, which contains a set of XML elements called response multistatus, which contains a set of XML elements called response
which contain 200, 300, 400, and 500 series status codes generated which contain 200, 300, 400, and 500 series status codes generated
during the method invocation. 100 series status codes SHOULD NOT be during the method invocation. 100 series status codes SHOULD NOT be
recorded in a response XML element. The 207 status code itself MUST recorded in a response XML element. The 207 status code itself MUST
NOT be considered a success response, it is only completely NOT be considered a success response, it is only completely
successful if all response elements inside contain success status successful if all response elements inside contain success status
skipping to change at page 69, line 6 skipping to change at page 76, line 7
a Location header to indicate where the client should make the a Location header to indicate where the client should make the
request. The Multi-Status response syntax as defined in RFC2518 did request. The Multi-Status response syntax as defined in RFC2518 did
not allow for the Location header information to be included in an not allow for the Location header information to be included in an
unambiguous way, so servers MAY choose not to use these status codes unambiguous way, so servers MAY choose not to use these status codes
in Multi-Status responses. If a clients receives this status code in in Multi-Status responses. If a clients receives this status code in
Multi-Status, the client MAY reissue the request to the individual Multi-Status, the client MAY reissue the request to the individual
resource, so that the server can issue a response with a Location resource, so that the server can issue a response with a Location
header for each resource. header for each resource.
Additionally, this specification defines a new element that servers Additionally, this specification defines a new element that servers
MAY use in the response element to provide a location value in MAY use in the response element to provide a location value in Multi-
Multi-Status (see Section 13.29). Status (see Section 13.29).
13. XML Element Definitions 13. XML Element Definitions
In this section, the final line of each section gives the element In this section, the final line of each section gives the element
type declaration using the format defined in XML [11]. The "Value" type declaration using the format defined in XML [11]. The "Value"
field, where present, specifies further restrictions on the allowable field, where present, specifies further restrictions on the allowable
contents of the XML element using BNF (i.e., to further restrict the contents of the XML element using BNF (i.e., to further restrict the
values of a PCDATA element). The "Extensibility" field discusses how values of a PCDATA element). The "Extensibility" field discusses how
the element may be extended in the future (or in existing extensions the element may be extended in the future (or in existing extensions
to WebDAV. to WebDAV.
skipping to change at page 70, line 21 skipping to change at page 77, line 21
values of a PCDATA element). The "Extensibility" field discusses how values of a PCDATA element). The "Extensibility" field discusses how
the element may be extended in the future (or in existing extensions the element may be extended in the future (or in existing extensions
to WebDAV. to WebDAV.
All of the elements defined here may be extended by the addition of All of the elements defined here may be extended by the addition of
attributes and child elements not defined in this specification. attributes and child elements not defined in this specification.
13.1 activelock XML Element 13.1 activelock XML Element
Name: activelock Name: activelock
Namespace: DAV: Namespace: DAV:
Purpose: Describes a lock on a resource. Purpose: Describes a lock on a resource.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT activelock (lockscope, locktype, depth, owner?, timeout?, <!ELEMENT activelock (lockscope, locktype, depth, owner?, timeout?,
locktoken?, lockroot)> locktoken?, lockroot)>
13.2 depth XML Element 13.2 depth XML Element
Name: depth Name: depth
Namespace: DAV: Namespace: DAV:
Purpose: The value of the Depth header. Purpose: The value of the Depth header.
Value: "0" | "1" | "infinity" Value: "0" | "1" | "infinity"
Extensibility: MAY be extended with attributes which SHOULD be Extensibility: MAY be extended with attributes which SHOULD be
ignored. ignored.
<!ELEMENT depth (#PCDATA) > <!ELEMENT depth (#PCDATA) >
13.3 locktoken XML Element 13.3 locktoken XML Element
Name: locktoken Name: locktoken
Namespace: DAV: Namespace: DAV:
Purpose: The lock token associated with a lock. Purpose: The lock token associated with a lock.
Description: The href contains a single lock token URI which refers Description: The href contains a single lock token URI which refers
to the lock (i.e., the OpaqueLockToken-URI production in section to the lock (i.e., the OpaqueLockToken-URI production in section
6.4). 6.4).
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT locktoken (href) > <!ELEMENT locktoken (href) >
13.4 lockroot XML Element 13.4 lockroot XML Element
Name: lockroot Name: lockroot
Namespace: DAV: Namespace: DAV:
Purpose: Contains the root URL of the lock, which is the URL through Purpose: Contains the root URL of the lock, which is the URL through
which the resource was addressed in the LOCK request. which the resource was addressed in the LOCK request.
Description: The href contains a URL with the address of the root of Description: The href contains a URL with the address of the root of
the lock. The server SHOULD include this in all lockdiscovery the lock. The server SHOULD include this in all lockdiscovery
property values and the response to LOCK requests. property values and the response to LOCK requests.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT lockroot (href) > <!ELEMENT lockroot (href) >
13.5 timeout XML Element 13.5 timeout XML Element
Name: timeout Name: timeout
Namespace: DAV: Namespace: DAV:
Purpose: The number of seconds remaining before a lock expires. Purpose: The number of seconds remaining before a lock expires.
Value: TimeType (defined in Section 9.8). Value: TimeType (defined in Section 9.8).
Extensibility: MAY be extended with attributes which SHOULD be Extensibility: MAY be extended with attributes which SHOULD be
ignored. ignored.
<!ELEMENT timeout (#PCDATA) > <!ELEMENT timeout (#PCDATA) >
13.6 collection XML Element 13.6 collection XML Element
Name: collection Name: collection
Namespace: DAV: Namespace: DAV:
Purpose: Identifies the associated resource as a collection. The Purpose: Identifies the associated resource as a collection. The
resourcetype property of a collection resource MUST contain this resourcetype property of a collection resource MUST contain this
element. It is normally empty but extensions may add element. It is normally empty but extensions may add sub-
sub-elements. elements.
Extensibility: MAY be extended with child elements or attributes Extensibility: MAY be extended with child elements or attributes
which SHOULD be ignored if not recognized. which SHOULD be ignored if not recognized.
<!ELEMENT collection EMPTY > <!ELEMENT collection EMPTY >
13.7 href XML Element 13.7 href XML Element
Name: href Name: href
Namespace: DAV: Namespace: DAV:
Purpose: Identifies the content of the element as a URI. In many Purpose: Identifies the content of the element as a URI. In many
situations, this URI MUST be a HTTP URI, and furthermore, it MUST situations, this URI MUST be a HTTP URI, and furthermore, it MUST
identify a WebDAV resource. There is one exception to this identify a WebDAV resource. There is one exception to this
general rule in the lockdiscovery property, where the lock token general rule in the lockdiscovery property, where the lock token
(which is a URI but may not be a HTTP URI) is inside the href (which is a URI but may not be a HTTP URI) is inside the href
element. Other specifications SHOULD be explicit if the href element. Other specifications SHOULD be explicit if the href
element is to contain non-HTTP URIs. element is to contain non-HTTP URIs.
Value: URI (See section 3.2.1 of RFC2616 [8])
Value: URI (See section 3.2.1 of RFC2616 [7])
Extensibility: MAY be extended with attributes which SHOULD be Extensibility: MAY be extended with attributes which SHOULD be
ignored. ignored.
<!ELEMENT href (#PCDATA)> <!ELEMENT href (#PCDATA)>
13.8 lockentry XML Element 13.8 lockentry XML Element
Name: lockentry Name: lockentry
Namespace: DAV: Namespace: DAV:
Purpose: Defines the types of locks that can be used with the Purpose: Defines the types of locks that can be used with the
resource. resource.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT lockentry (lockscope, locktype) > <!ELEMENT lockentry (lockscope, locktype) >
13.9 lockinfo XML Element 13.9 lockinfo XML Element
Name: lockinfo Name: lockinfo
Namespace: DAV: Namespace: DAV:
Purpose: The lockinfo XML element is used with a LOCK method to Purpose: The lockinfo XML element is used with a LOCK method to
specify the type of lock the client wishes to have created. specify the type of lock the client wishes to have created.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT lockinfo (lockscope, locktype, owner?) > <!ELEMENT lockinfo (lockscope, locktype, owner?) >
13.10 lockscope XML Element 13.10 lockscope XML Element
Name: lockscope Name: lockscope
Namespace: DAV: Namespace: DAV:
Purpose: Specifies whether a lock is an exclusive lock, or a shared Purpose: Specifies whether a lock is an exclusive lock, or a shared
lock. lock.
Extensibility: SHOULD NOT be extended with child elements. MAY be Extensibility: SHOULD NOT be extended with child elements. MAY be
extended with attributes which SHOULD be ignored. extended with attributes which SHOULD be ignored.
<!ELEMENT lockscope (exclusive | shared) > <!ELEMENT lockscope (exclusive | shared) >
13.11 exclusive XML Element 13.11 exclusive XML Element
Name: exclusive Name: exclusive
Namespace: DAV: Namespace: DAV:
Purpose: Specifies an exclusive lock Purpose: Specifies an exclusive lock
Extensibility: Normally empty, but MAY be extended with additional Extensibility: Normally empty, but MAY be extended with additional
child elements or attributes which SHOULD be ignored if not child elements or attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT exclusive EMPTY > <!ELEMENT exclusive EMPTY >
13.12 shared XML Element 13.12 shared XML Element
Name: shared Name: shared
Namespace: DAV: Namespace: DAV:
Purpose: Specifies a shared lock Purpose: Specifies a shared lock
Extensibility: Normally empty, but MAY be extended with additional Extensibility: Normally empty, but MAY be extended with additional
child elements or attributes which SHOULD be ignored if not child elements or attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT shared EMPTY > <!ELEMENT shared EMPTY >
13.13 locktype XML Element 13.13 locktype XML Element
Name: locktype Name: locktype
Namespace: DAV: Namespace: DAV:
Purpose: Specifies the access type of a lock. At present, this Purpose: Specifies the access type of a lock. At present, this
specification only defines one lock type, the write lock. specification only defines one lock type, the write lock.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT locktype (write) > <!ELEMENT locktype (write) >
13.14 write XML Element 13.14 write XML Element
Name: write Name: write
Namespace: DAV: Namespace: DAV:
Purpose: Specifies a write lock. Purpose: Specifies a write lock.
Extensibility: Normally empty, but MAY be extended with additional Extensibility: Normally empty, but MAY be extended with additional
child elements or attributes which SHOULD be ignored if not child elements or attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT write EMPTY > <!ELEMENT write EMPTY >
13.15 multistatus XML Element 13.15 multistatus XML Element
Name: multistatus Name: multistatus
Namespace: DAV: Namespace: DAV:
Purpose: Contains multiple response messages. Purpose: Contains multiple response messages.
Description The responsedescription at the top level is used to Description The responsedescription at the top level is used to
provide a general message describing the overarching nature of the provide a general message describing the overarching nature of the
response. If this value is available an application may use it response. If this value is available an application may use it
instead of presenting the individual response descriptions instead of presenting the individual response descriptions
contained within the responses. contained within the responses.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT multistatus (response+, responsedescription?) > <!ELEMENT multistatus (response+, responsedescription?) >
13.16 response XML Element 13.16 response XML Element
Name: locktype Name: locktype
Namespace: DAV: Namespace: DAV:
Purpose: Holds a single response describing the effect of a method Purpose: Holds a single response describing the effect of a method
on resource and/or its properties. on resource and/or its properties.
Description: A particular href MUST NOT appear more than once as the Description: A particular href MUST NOT appear more than once as the
child of a response XML element under a multistatus XML element. child of a response XML element under a multistatus XML element.
This requirement is necessary in order to keep processing costs This requirement is necessary in order to keep processing costs
for a response to linear time. Essentially, this prevents having for a response to linear time. Essentially, this prevents having
to search in order to group together all the responses by href. to search in order to group together all the responses by href.
There are, however, no requirements regarding ordering based on There are, however, no requirements regarding ordering based on
href values. href values.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT response (href, ((href*, status)|(propstat+)), <!ELEMENT response (href, ((href*, status)|(propstat+)),
responsedescription? , location?) > responsedescription? , location?) >
13.17 propstat XML Element 13.17 propstat XML Element
Name: propstat Name: propstat
Namespace: DAV: Namespace: DAV:
Purpose: Groups together a prop and status element that is Purpose: Groups together a prop and status element that is
associated with a particular href element. associated with a particular href element.
Description: The propstat XML element MUST contain one prop XML Description: The propstat XML element MUST contain one prop XML
element and one status XML element. The contents of the prop XML element and one status XML element. The contents of the prop XML
element MUST only list the names of properties to which the result element MUST only list the names of properties to which the result
in the status element applies. in the status element applies.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT propstat (prop, status, responsedescription?) > <!ELEMENT propstat (prop, status, responsedescription?) >
13.18 status XML Element 13.18 status XML Element
Name: status Name: status
Namespace: DAV: Namespace: DAV:
Purpose: Holds a single HTTP status-line Purpose: Holds a single HTTP status-line
Value: status-line (status-line defined in RFC2616 [8]
Value: status-line (status-line defined in RFC2616 [7]
Extensibility: MAY be extended with attributes which SHOULD be Extensibility: MAY be extended with attributes which SHOULD be
ignored. ignored.
<!ELEMENT status (#PCDATA) > <!ELEMENT status (#PCDATA) >
13.19 responsedescription XML Element 13.19 responsedescription XML Element
Name: responsedescription Name: responsedescription
Namespace: DAV: Namespace: DAV:
Purpose: Contains a message that can be displayed to the user Purpose: Contains a message that can be displayed to the user
explaining the nature of the response. explaining the nature of the response.
Description: This XML element provides information suitable to be Description: This XML element provides information suitable to be
presented to a user. presented to a user.
Extensibility: MAY be extended with attributes which SHOULD be Extensibility: MAY be extended with attributes which SHOULD be
ignored. ignored.
<!ELEMENT responsedescription (#PCDATA) > <!ELEMENT responsedescription (#PCDATA) >
13.20 owner XML Element 13.20 owner XML Element
Name: owner Name: owner
Namespace: DAV: Namespace: DAV:
Purpose: Provides information about the principal taking out a lock. Purpose: Provides information about the principal taking out a lock.
Description The owner XML element provides information sufficient for Description The owner XML element provides information sufficient for
either directly contacting a principal (such as a telephone number either directly contacting a principal (such as a telephone number
or Email URI), or for discovering the principal (such as the URL or Email URI), or for discovering the principal (such as the URL
of a homepage) who owns a lock. This information is provided by of a homepage) who owns a lock. This information is provided by
the client, and may only be altered by the server if the owner the client, and may only be altered by the server if the owner
value provided by the client is empty. value provided by the client is empty.
Extensibility MAY be extended with child elements, mixed content, Extensibility MAY be extended with child elements, mixed content,
text content or attributes. Structured content, for example one text content or attributes. Structured content, for example one
or more <href> child elements containing URLs, is RECOMMENDED. or more <href> child elements containing URLs, is RECOMMENDED.
<!ELEMENT owner ANY <!ELEMENT owner ANY >
13.21 prop XML element 13.21 prop XML element
Name: prop Name: prop
Namespace: DAV: Namespace: DAV:
Purpose: Contains properties related to a resource. Purpose: Contains properties related to a resource.
Description The prop XML element is a generic container for Description The prop XML element is a generic container for
properties defined on resources. All elements inside a prop XML properties defined on resources. All elements inside a prop XML
element MUST define properties related to the resource. No other element MUST define properties related to the resource. No other
elements may be used inside of a prop element. elements may be used inside of a prop element.
Extensibility MAY be extended with attributes which SHOULD be ignored Extensibility MAY be extended with attributes which SHOULD be ignored
if not recognized. Any child element of this element must be if not recognized. Any child element of this element must be
considered to be a property name, however these are not restricted considered to be a property name, however these are not restricted
to the property names defined in this document or other standards. to the property names defined in this document or other standards.
skipping to change at page 76, line 10 skipping to change at page 85, line 23
Description The prop XML element is a generic container for Description The prop XML element is a generic container for
properties defined on resources. All elements inside a prop XML properties defined on resources. All elements inside a prop XML
element MUST define properties related to the resource. No other element MUST define properties related to the resource. No other
elements may be used inside of a prop element. elements may be used inside of a prop element.
Extensibility MAY be extended with attributes which SHOULD be ignored Extensibility MAY be extended with attributes which SHOULD be ignored
if not recognized. Any child element of this element must be if not recognized. Any child element of this element must be
considered to be a property name, however these are not restricted considered to be a property name, however these are not restricted
to the property names defined in this document or other standards. to the property names defined in this document or other standards.
<!ELEMENT prop ANY <!ELEMENT prop ANY >
13.22 propertyupdate XML element 13.22 propertyupdate XML element
Name: propertyupdate Name: propertyupdate
Namespace: DAV: Namespace: DAV:
Purpose: Contains a request to alter the properties on a resource. Purpose: Contains a request to alter the properties on a resource.
Description: This XML element is a container for the information Description: This XML element is a container for the information
required to modify the properties on the resource. This XML required to modify the properties on the resource. This XML
element is multi-valued. element is multi-valued.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT propertyupdate (remove | set)+ > <!ELEMENT propertyupdate (remove | set)+ >
13.23 remove XML element 13.23 remove XML element
Name: remove Name: remove
Namespace: DAV: Namespace: DAV:
Purpose: Lists the DAV properties to be removed from a resource. Purpose: Lists the DAV properties to be removed from a resource.
Description: Remove instructs that the properties specified in prop Description: Remove instructs that the properties specified in prop
should be removed. Specifying the removal of a property that does should be removed. Specifying the removal of a property that does
not exist is not an error. All the XML elements in a prop XML not exist is not an error. All the XML elements in a prop XML
element inside of a remove XML element MUST be empty, as only the element inside of a remove XML element MUST be empty, as only the
names of properties to be removed are required. names of properties to be removed are required.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT remove (prop) > <!ELEMENT remove (prop) >
13.24 set XML element 13.24 set XML element
Name: set Name: set
Namespace: DAV: Namespace: DAV:
Purpose: Lists the DAV property values to be set for a resource. Purpose: Lists the DAV property values to be set for a resource.
Description: The set XML element MUST contain only a prop XML Description: The set XML element MUST contain only a prop XML
element. The elements contained by the prop XML element inside element. The elements contained by the prop XML element inside
the set XML element MUST specify the name and value of properties the set XML element MUST specify the name and value of properties
that are set on the resource identified by Request-URI. If a that are set on the resource identified by Request-URI. If a
property already exists then its value is replaced. Language property already exists then its value is replaced. Language
tagging information appearing in the scope of the prop element (in tagging information appearing in the scope of the prop element (in
the "xml:lang" attribute, if present) MUST be persistently stored the "xml:lang" attribute, if present) MUST be persistently stored
along with the property, and MUST be subsequently retrievable along with the property, and MUST be subsequently retrievable
using PROPFIND. using PROPFIND.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT set (prop) > <!ELEMENT set (prop) >
13.25 propfind XML Element 13.25 propfind XML Element
Name: propfind Name: propfind
Namespace: DAV: Namespace: DAV:
Purpose: Specifies the properties to be returned from a PROPFIND Purpose: Specifies the properties to be returned from a PROPFIND
method. Four special elements are specified for use with method. Four special elements are specified for use with
propfind: prop, dead-props, allprop and propname. If prop is used propfind: prop, dead-props, allprop and propname. If prop is used
inside propfind it MUST NOT contain property values. inside propfind it MUST NOT contain property values.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized, as long as attributes which SHOULD be ignored if not recognized, as long as
it still contains one of the required elements. it still contains one of the required elements.
<!ELEMENT propfind (prop | dead-props | propname | allprop) > <!ELEMENT propfind (prop | dead-props | propname | allprop) >
13.26 allprop XML Element 13.26 allprop XML Element
Name: allprop Name: allprop
Namespace: DAV: Namespace: DAV:
Purpose: The allprop XML element specifies that all names and values Purpose: The allprop XML element specifies that all names and values
of dead properties and the live properties defined by this of dead properties and the live properties defined by this
document existing on the resource are to be returned. document existing on the resource are to be returned.
Extensibility: Normally empty, but MAY be extended with additional Extensibility: Normally empty, but MAY be extended with additional
child elements or attributes which SHOULD be ignored if not child elements or attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT allprop EMPTY > <!ELEMENT allprop EMPTY >
13.27 propname XML Element 13.27 propname XML Element
Name: propname Name: propname
Namespace: DAV: Namespace: DAV:
Purpose: The propname XML element specifies that only a list of Purpose: The propname XML element specifies that only a list of
property names on the resource is to be returned. property names on the resource is to be returned.
Extensibility: Normally empty, but MAY be extended with additional Extensibility: Normally empty, but MAY be extended with additional
child elements or attributes which SHOULD be ignored if not child elements or attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT propname EMPTY > <!ELEMENT propname EMPTY >
13.28 dead-props XML Element 13.28 dead-props XML Element
Name: dead-props Name: dead-props
Namespace: DAV: Namespace: DAV:
Purpose: The dead-props XML element specifies that all dead Purpose: The dead-props XML element specifies that all dead
properties, names and values, should be returned in the response. properties, names and values, should be returned in the response.
Extensibility: Normally empty, but MAY be extended with additional Extensibility: Normally empty, but MAY be extended with additional
child elements or attributes which SHOULD be ignored if not child elements or attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT dead-props EMPTY > <!ELEMENT dead-props EMPTY >
13.29 location XML Element 13.29 location XML Element
Name: location Name: location
Namespace: DAV: Namespace: DAV:
Purpose: In normal responses (not Multi-Status), some status codes Purpose: In normal responses (not Multi-Status), some status codes
go along with a Location header. When these status codes are used go along with a Location header. When these status codes are used
in a Multi-Status response, this element is used instead. in a Multi-Status response, this element is used instead.
Description: Contains a single href element with the same URI that Description: Contains a single href element with the same URI that
would be used in a Location header. would be used in a Location header.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT location (href) > <!ELEMENT location (href) >
13.30 error XML Element 13.30 error XML Element
Name: error Name: error
Namespace: DAV: Namespace: DAV:
Purpose: Error responses, particularly 403 Forbidden and 409 Purpose: Error responses, particularly 403 Forbidden and 409
Conflict, sometimes need more information to indicate what went Conflict, sometimes need more information to indicate what went
wrong. When an error response contains a body in WebDAV, the body wrong. When an error response contains a body in WebDAV, the body
is in XML with the root element 'error'. The 'error' tag SHOULD is in XML with the root element 'error'. The 'error' tag SHOULD
include a standard error tag defined in this specification or include a standard error tag defined in this specification or
another specification. The 'error' tag MAY include custom error another specification. The 'error' tag MAY include custom error
tags (in custom namespaces) which a client can safely ignore. tags (in custom namespaces) which a client can safely ignore.
Description: Contains any XML element Description: Contains any XML element
Extensibility: Fully extensible with additional child elements or Extensibility: Fully extensible with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT error ANY > <!ELEMENT error ANY >
14. DAV Properties 14. DAV Properties
For DAV properties, the name of the property is also the same as the For DAV properties, the name of the property is also the same as the
name of the XML element that contains its value. In the section name of the XML element that contains its value. In the section
below, the final line of each section gives the element type below, the final line of each section gives the element type
skipping to change at page 79, line 29 skipping to change at page 89, line 29
Existing server implementations already have different sets of Existing server implementations already have different sets of
RFC2518 properties protected, but clients can have some expectations RFC2518 properties protected, but clients can have some expectations
which properties are normally protected. The value of a protected which properties are normally protected. The value of a protected
property may not be changed even by a user with permission to edit property may not be changed even by a user with permission to edit
other properties. The value of an unprotected property may be other properties. The value of an unprotected property may be
changed by some users with appropriate permissions. changed by some users with appropriate permissions.
14.1 creationdate Property 14.1 creationdate Property
Name: creationdate Name: creationdate
Namespace: DAV: Namespace: DAV:
Purpose: Records the time and date the resource was created. Purpose: Records the time and date the resource was created.
Value: date-time (defined in RFC3339 [9], see the ABNF in section
Value: date-time (defined in RFC3339 [8], see the ABNF in section
5.6.) 5.6.)
Protected: MAY be protected. Some servers allow creationdate to be Protected: MAY be protected. Some servers allow creationdate to be
changed to reflect the time the document was created if that is changed to reflect the time the document was created if that is
more meaningful to the user (rather than the time it was more meaningful to the user (rather than the time it was
uploaded). Thus, clients SHOULD NOT use this property in uploaded). Thus, clients SHOULD NOT use this property in
synchronization logic (use getetag instead). synchronization logic (use getetag instead).
COPY/MOVE behaviour: This property value SHOULD be kept during a COPY/MOVE behaviour: This property value SHOULD be kept during a
MOVE operation, but is normally re-initialized when a resource is MOVE operation, but is normally re-initialized when a resource is
created with a COPY. It should not be set in a COPY. created with a COPY. It should not be set in a COPY.
Description: The creationdate property should be defined on all DAV Description: The creationdate property should be defined on all DAV
compliant resources. If present, it contains a timestamp of the compliant resources. If present, it contains a timestamp of the
moment when the resource was created (i.e., the moment it had moment when the resource was created (i.e., the moment it had non-
non-null state). null state).
Extensibility: MAY contain attributes which SHOULD be ignored if not Extensibility: MAY contain attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT creationdate (#PCDATA) > <!ELEMENT creationdate (#PCDATA) >
14.2 displayname Property 14.2 displayname Property
Name: displayname Name: displayname
Namespace: DAV: Namespace: DAV:
Purpose: Provides a name for the resource that is suitable for Purpose: Provides a name for the resource that is suitable for
presentation to a user. presentation to a user.
Value: Any text Value: Any text
Protected: Possibly Protected: Possibly
COPY/MOVE behaviour: This property value SHOULD be preserved in COPY/MOVE behaviour: This property value SHOULD be preserved in
local COPY and MOVE operations. It MAY be attempted to be set in local COPY and MOVE operations. It MAY be attempted to be set in
a COPY operation to a remote server. a COPY operation to a remote server.
Description: The displayname property should be defined on all DAV Description: The displayname property should be defined on all DAV
compliant resources. If present, the property contains a compliant resources. If present, the property contains a
description of the resource that is suitable for presentation to a description of the resource that is suitable for presentation to a
user. user.
Extensibility: MAY contain attributes which SHOULD be ignored if not Extensibility: MAY contain attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT displayname (#PCDATA) > <!ELEMENT displayname (#PCDATA) >
14.3 getcontentlanguage Property 14.3 getcontentlanguage Property
Name: getcontentlanguage Name: getcontentlanguage
Namespace: DAV: Namespace: DAV:
Purpose: Contains the Content-Language header returned by a GET Purpose: Contains the Content-Language header returned by a GET
without accept headers without accept headers
Value: language-tag (language-tag is defined in section 14.13 of Value: language-tag (language-tag is defined in section 14.13 of
RFC2616 [8]) RFC2616 [7])
Protected: SHOULD NOT be protected, so that clients can reset the Protected: SHOULD NOT be protected, so that clients can reset the
language. language.
COPY/MOVE behaviour: This property value SHOULD be preserved in COPY/MOVE behaviour: This property value SHOULD be preserved in
local COPY and MOVE operations. It SHOULD be attempted to be set local COPY and MOVE operations. It SHOULD be attempted to be set
in a COPY operation to a remote server. in a COPY operation to a remote server.
Description: The getcontentlanguage property MUST be defined on any Description: The getcontentlanguage property MUST be defined on any
DAV compliant resource that returns the Content-Language header on DAV compliant resource that returns the Content-Language header on
a GET. a GET.
Extensibility: MAY contain attributes which SHOULD be ignored if not Extensibility: MAY contain attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT getcontentlanguage (#PCDATA) > <!ELEMENT getcontentlanguage (#PCDATA) >
14.4 getcontentlength Property 14.4 getcontentlength Property
Name: getcontentlength Name: getcontentlength
Namespace: DAV: Namespace: DAV:
Purpose: Contains the Content-Length header returned by a GET Purpose: Contains the Content-Length header returned by a GET
without accept headers. without accept headers.
Value: content-length (see section 14.14 of RFC2616 [8]) Value: content-length (see section 14.14 of RFC2616 [7])
Protected: SHOULD be protected so clients cannot set to misleading Protected: SHOULD be protected so clients cannot set to misleading
values values
Description: The getcontentlength property MUST be defined on any Description: The getcontentlength property MUST be defined on any
DAV compliant resource that returns the Content-Length header in DAV compliant resource that returns the Content-Length header in
response to a GET. response to a GET.
COPY/MOVE behaviour: This property value is dependent on the size of COPY/MOVE behaviour: This property value is dependent on the size of
the destination resource, not the value of the property on the the destination resource, not the value of the property on the
source resource. source resource.
Extensibility: MAY contain attributes which SHOULD be ignored if not Extensibility: MAY contain attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT getcontentlength (#PCDATA) > <!ELEMENT getcontentlength (#PCDATA) >
14.5 getcontenttype Property 14.5 getcontenttype Property
Name: getcontenttype Name: getcontenttype
Namespace: DAV: Namespace: DAV:
Purpose: Contains the Content-Type header returned by a GET without Purpose: Contains the Content-Type header returned by a GET without
accept headers. accept headers.
Value: media-type (defined in section 3.7 of RFC2616 [8])
Value: media-type (defined in section 3.7 of RFC2616 [7])
Protected: SHOULD NOT be protected, so clients may fix this value Protected: SHOULD NOT be protected, so clients may fix this value
COPY/MOVE behaviour: This property value SHOULD be preserved in COPY/MOVE behaviour: This property value SHOULD be preserved in
local COPY and MOVE operations. In a remote COPY operation that local COPY and MOVE operations. In a remote COPY operation that
is implemented through a PUT request, the PUT request must have is implemented through a PUT request, the PUT request must have
the appropriate Content-Type header. the appropriate Content-Type header.
Description: This getcontenttype property MUST be defined on any DAV Description: This getcontenttype property MUST be defined on any DAV
compliant resource that returns the Content-Type header in compliant resource that returns the Content-Type header in
response to a GET. response to a GET.
Extensibility: MAY contain attributes which SHOULD be ignored if not Extensibility: MAY contain attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT getcontenttype (#PCDATA) > <!ELEMENT getcontenttype (#PCDATA) >
14.6 getetag Property 14.6 getetag Property
Name: getetag Name: getetag
Namespace: DAV: Namespace: DAV:
Purpose: Contains the ETag header returned by a GET without accept Purpose: Contains the ETag header returned by a GET without accept
headers. headers.
Value: entity-tag (defined in section 3.11 of RFC2616 [8])
Value: entity-tag (defined in section 3.11 of RFC2616 [7])
Protected: MUST be protected because this value is created and Protected: MUST be protected because this value is created and
controlled by the server. controlled by the server.
COPY/MOVE behaviour: This property value is dependent on the final COPY/MOVE behaviour: This property value is dependent on the final
state of the destination resource, not the value of the property state of the destination resource, not the value of the property
on the source resource. on the source resource.
Description: The getetag property MUST be defined on any DAV Description: The getetag property MUST be defined on any DAV
compliant resource that returns the Etag header. Refer to RFC2616 compliant resource that returns the Etag header. Refer to RFC2616
for a complete definition of the semantics of an ETag. Note that for a complete definition of the semantics of an ETag. Note that
changes in properties or lock state MUST not cause a resourceȔs changes in properties or lock state MUST not cause a resourceis
ETag to change. ETag to change.
Extensibility: MAY contain attributes which SHOULD be ignored if not Extensibility: MAY contain attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT getetag (#PCDATA) > <!ELEMENT getetag (#PCDATA) >
14.7 getlastmodified Property 14.7 getlastmodified Property
Name: getlastmodified Name: getlastmodified
Namespace: DAV: Namespace: DAV:
Purpose: Contains the Last-Modified header returned by a GET method Purpose: Contains the Last-Modified header returned by a GET method
without accept headers. without accept headers.
Value: HTTP-date (defined in section 3.3.1 of RFC2616 [8])
Value: rfc1123-date (defined in section 3.3.1 of RFC2616 [7])
Protected: SHOULD be protected because some clients may rely on the Protected: SHOULD be protected because some clients may rely on the
value for appropriate caching behavior, or on the value of the value for appropriate caching behavior, or on the value of the
Last-Modified header to which this property is linked. Last-Modified header to which this property is linked.
COPY/MOVE behaviour: This property value is dependent on the last COPY/MOVE behaviour: This property value is dependent on the last
modified date of the destination resource, not the value of the modified date of the destination resource, not the value of the
property on the source resource. Note that some server property on the source resource. Note that some server
implementations use the file system date modified value for the implementations use the file system date modified value for the
'getlastmodified' value, and this is preserved in a MOVE even when 'getlastmodified' value, and this is preserved in a MOVE even when
the HTTP Last-Modified value SHOULD change. Thus, clients cannot the HTTP Last-Modified value SHOULD change. Thus, clients cannot
rely on this value for caching and SHOULD use ETags. rely on this value for caching and SHOULD use ETags.
Description: Note that the last-modified date on a resource SHOULD Description: Note that the last-modified date on a resource SHOULD
only reflect changes in the body (the GET responses) of the only reflect changes in the body (the GET responses) of the
resource. A change in a property only SHOULD NOT cause the resource. A change in a property only SHOULD NOT cause the last-
last-modified date to change, because clients MAY rely on the modified date to change, because clients MAY rely on the last-
last-modified date to know when to overwrite the existing body. modified date to know when to overwrite the existing body. The
The getlastmodified property MUST be defined on any DAV compliant getlastmodified property MUST be defined on any DAV compliant
resource that returns the Last- Modified header in response to a resource that returns the Last- Modified header in response to a
GET. GET.
Extensibility: MAY contain attributes which SHOULD be ignored if not Extensibility: MAY contain attributes which SHOULD be ignored if not
recognized. recognized.
<!ELEMENT getlastmodified (#PCDATA) > <!ELEMENT getlastmodified (#PCDATA) >
14.8 lockdiscovery Property 14.8 lockdiscovery Property
Name: lockdiscovery Name: lockdiscovery
Namespace: DAV: Namespace: DAV:
Purpose: Describes the active locks on a resource Purpose: Describes the active locks on a resource
Protected: MUST be protected. Clients change the list of locks Protected: MUST be protected. Clients change the list of locks
through LOCK and UNLOCK, not through PROPPATCH. through LOCK and UNLOCK, not through PROPPATCH.
COPY/MOVE behaviour: The value of this property depends on the lock COPY/MOVE behaviour: The value of this property depends on the lock
state of the destination, not on the locks of the source resource. state of the destination, not on the locks of the source resource.
Recall that locks are not moved in a MOVE operation. Recall that locks are not moved in a MOVE operation.
Description: The lockdiscovery property returns a listing of who has Description: The lockdiscovery property returns a listing of who has
a lock, what type of lock he has, the timeout type and the time a lock, what type of lock he has, the timeout type and the time
remaining on the timeout, and the associated lock token. If there remaining on the timeout, and the associated lock token. If there
are no locks, but the server supports locks, the property will be are no locks, but the server supports locks, the property will be
present but contain zero Č½activelockČ” elements. If there is one present but contain zero eactivelocki elements. If there is one
or more lock, an Č½activelockČ” element appears for each lock on or more lock, an eactivelocki element appears for each lock on the
the resource. resource.
Extensibility: MAY be extended with additional child elements or Extensibility: MAY be extended with additional child elements or
attributes which SHOULD be ignored if not recognized. attributes which SHOULD be ignored if not recognized.
<!ELEMENT lockdiscovery (activelock)* > <!ELEMENT lockdiscovery (activelock)* >
14.8.1 Example - Retrieving the lockdiscovery Property 14.8.1 Example - Retrieving the lockdiscovery Property
>>Request >>Request
PROPFIND /container/ HTTP/1.1 PROPFIND /container/ HTTP/1.1
Host: www.example.com Host: www.example.com
Content-Length: xxxx Content-Length: xxxx
Content-Type: text/xml; charset="utf-8" Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D='DAV:'> <D:propfind xmlns:D='DAV:'>
<D:prop><D:lockdiscovery/></D:prop> <D:prop><D:lockdiscovery/></D:prop>
skipping to change at page 84, line 28 skipping to change at page 96, line 8
</D:propstat> </D:propstat>
</D:response> </D:response>
</D:multistatus> </D:multistatus>
This resource has a single exclusive write lock on it, with an This resource has a single exclusive write lock on it, with an
infinite timeout. infinite timeout.
14.9 resourcetype Property 14.9 resourcetype Property
Name: resourcetype Name: resourcetype
Namespace: DAV: Namespace: DAV:
Purpose: Specifies the nature of the resource. Purpose: Specifies the nature of the resource.
Protected: SHOULD be protected. Resource type is generally decided Protected: SHOULD be protected. Resource type is generally decided
through the operation creating the resource (MKCOL vs PUT), not by through the operation creating the resource (MKCOL vs PUT), not by
PROPPATCH. PROPPATCH.
COPY/MOVE behaviour: Generally a COPY/MOVE of a resource results in COPY/MOVE behaviour: Generally a COPY/MOVE of a resource results in
the same type of resource at the destination. In a remote COPY, the same type of resource at the destination. In a remote COPY,
the source server SHOULD NOT attempt to set this property. the source server SHOULD NOT attempt to set this property.
Description: The resourcetype property MUST be defined on all DAV Description: The resourcetype property MUST be defined on all DAV
compliant resources. The default value is empty. compliant resources. The default value is empty.
Extensibility: MAY be extended with any child elements or attributes Extensibility: MAY be extended with any child elements or attributes
which SHOULD be ignored if not recognized. If the element which SHOULD be ignored if not recognized. If the element
contains the 'collection' child element plus additional contains the 'collection' child element plus additional
unrecognized elements/attributes, it should generally be treated unrecognized elements/attributes, it should generally be treated
as a collection. If the element contains no recognized child as a collection. If the element contains no recognized child
elements it should be treated as a non- collection elements it should be treated as a non- collection WebDAV-
WebDAV-compliant resource. compliant resource.
Example: (fictional example to show extensibility) Example: (fictional example to show extensibility)
<x:resourcetype xmlns:x="DAV:"> <x:resourcetype xmlns:x="DAV:">
<x:collection/> <x:collection/>
<f:search-results xmlns:f="http://www.example.com/ns"/> <f:search-results xmlns:f="http://www.example.com/ns"/>
</x:resourcetype> </x:resourcetype>
14.10 supportedlock Property 14.10 supportedlock Property
skipping to change at page 88, line 4 skipping to change at page 100, line 8
to identify a lock for the purposes of an operation such as to identify a lock for the purposes of an operation such as
refresh LOCK or UNLOCK. However, if the Request-URI doe not fall refresh LOCK or UNLOCK. However, if the Request-URI doe not fall
within the scope of the lock identified by the token, the server within the scope of the lock identified by the token, the server
SHOULD use this error. The lock may have a scope that does not SHOULD use this error. The lock may have a scope that does not
include the Request-URI, or the lock could have disappeared, or include the Request-URI, or the lock could have disappeared, or
the token may be invalid. the token may be invalid.
<!ELEMENT requesturi-must-match-lock-token EMPTY > <!ELEMENT requesturi-must-match-lock-token EMPTY >
Name: missing-lock-token Name: missing-lock-token
Namespace: DAV: Namespace: DAV:
Use with: 400 Bad Request Use with: 400 Bad Request
Purpose: (precondition) -- If the server rejects a request because Purpose: (precondition) -- If the server rejects a request because
the request MUST have a lock token and is missing the lock token the request MUST have a lock token and is missing the lock token
header or header value (e.g. on an UNLOCK request), the server header or header value (e.g. on an UNLOCK request), the server
SHOULD use this error. SHOULD use this error. The 'missing-lock-token' element MUST
contain at least one URL of a locked resource for which a lock
token was expected.
<!ELEMENT missing-lock-token EMPTY > <!ELEMENT missing-lock-token href* >
Name: live-properties-not-preserved Name: live-properties-not-preserved
Namespace: DAV: Namespace: DAV:
Use with: 409 Conflict Use with: 409 Conflict
Purpose: (postcondition) -- The server received an otherwise-valid Purpose: (postcondition) -- The server received an otherwise-valid
MOVE or COPY request, but cannot maintain the live properties with MOVE or COPY request, but cannot maintain the live properties with
the same behavior at the destination. It may be that the server the same behavior at the destination. It may be that the server
only supports some live properties in some parts of the only supports some live properties in some parts of the
repository, or simply has an internal error. repository, or simply has an internal error.
<!ELEMENT live-properties-not-preserved EMPTY > <!ELEMENT live-properties-not-preserved EMPTY >
Name: read-only-property Name: read-only-property
Namespace: DAV: Namespace: DAV:
Use with: 403 Forbidden Use with: 403 Forbidden
Purpose: (precondition) -- The client attempted to set a read-only Purpose: (precondition) -- The client attempted to set a read-only
property in a PROPPATCH (such as 'getetag'). property in a PROPPATCH (such as 'getetag').
<!ELEMENT read-only-property EMPTY > <!ELEMENT read-only-property EMPTY >
Name: propfind-infinite-depth-forbidden Name: propfind-infinite-depth-forbidden
Namespace: DAV: Namespace: DAV:
Use with: 403 Forbidden Use with: 403 Forbidden
Purpose: (precondition) -- This server does not allow infinite-depth Purpose: (precondition) -- This server does not allow infinite-depth
PROPFIND requests on collections. PROPFIND requests on collections.
<!ELEMENT propfind-infinite-depth-forbidden EMPTY > <!ELEMENT propfind-infinite-depth-forbidden EMPTY >
Name: need-privileges Name: need-privileges
Namespace: DAV: Namespace: DAV:
Use with: 403 Forbidden Use with: 403 Forbidden
Purpose: (precondition) -- The currently authenticated user simply Purpose: (precondition) -- The currently authenticated user simply
does not have the privileges required to do the requested does not have the privileges required to do the requested
operation (e.g. UNLOCK a lock created by someone else). operation (e.g. UNLOCK a lock created by someone else).
<!ELEMENT need-privileges EMPTY > <!ELEMENT need-privileges EMPTY >
Name: missing-lock-token Name: missing-lock-token
Namespace: DAV: Namespace: DAV:
Use with: 423 Locked Use with: 423 Locked
Purpose: (precondition) -- The request could not succeed because a Purpose: (precondition) -- The request could not succeed because a
lock token should have been provided. This element, if present, lock token should have been provided. This element, if present,
MUST contain the URL of a locked resource that prevented the MUST contain the URL of a locked resource that prevented the
request. In cases of MOVE, COPY and DELETE where collection locks request. In cases of MOVE, COPY and DELETE where collection locks
are involved, it can be difficult for the client to find out which are involved, it can be difficult for the client to find out which
locked resource made the request fail -- but the server is only locked resource made the request fail -- but the server is only
resonsible for returning one such locked resource. The server MAY resonsible for returning one such locked resource. The server MAY
return every locked resource that prevented the request from return every locked resource that prevented the request from
succeeding if it knows them all. succeeding if it knows them all.
skipping to change at page 91, line 19 skipping to change at page 103, line 19
executing OPTIONS on the resource, and examining the "DAV" header executing OPTIONS on the resource, and examining the "DAV" header
which is returned. Note particularly that resources are spoken of as which is returned. Note particularly that resources are spoken of as
being compliant, rather than servers. That is because theoretically being compliant, rather than servers. That is because theoretically
some resources on a server could support different feature sets. some resources on a server could support different feature sets.
E.g. a server could have a sub-repository where an advanced feature E.g. a server could have a sub-repository where an advanced feature
like server was supported, even if that feature was not supported on like server was supported, even if that feature was not supported on
all servers. all servers.
Since this document describes extensions to the HTTP/1.1 protocol, Since this document describes extensions to the HTTP/1.1 protocol,
minimally all DAV compliant resources, clients, and proxies MUST be minimally all DAV compliant resources, clients, and proxies MUST be
compliant with RFC2616 [8]. compliant with RFC2616 [7].
A resource that is class 2 compliant must also be class 1 compliant, A resource that is class 2 compliant must also be class 1 compliant,
and a resource that is compliant with "bis" must also be class 1 and a resource that is compliant with "bis" must also be class 1
compliant. compliant.
17.1 Class 1 17.1 Class 1
A class 1 compliant resource MUST meet all "MUST" requirements in all A class 1 compliant resource MUST meet all "MUST" requirements in all
sections of this document. sections of this document.
skipping to change at page 93, line 8 skipping to change at page 105, line 8
the requirements of this specification, but MUST NOT use an older the requirements of this specification, but MUST NOT use an older
behavior indiscriminately. behavior indiscriminately.
Example: Example:
DAV: 1, bis DAV: 1, bis
18. Internationalization Considerations 18. Internationalization Considerations
In the realm of internationalization, this specification complies In the realm of internationalization, this specification complies
with the IETF Character Set Policy RFC2277 [8]. In this with the IETF Character Set Policy RFC2277 [7]. In this
specification, human-readable fields can be found either in the value specification, human-readable fields can be found either in the value
of a property, or in an error message returned in a response entity of a property, or in an error message returned in a response entity
body. In both cases, the human-readable content is encoded using body. In both cases, the human-readable content is encoded using
XML, which has explicit provisions for character set tagging and XML, which has explicit provisions for character set tagging and
encoding, and requires that XML processors read XML elements encoded, encoding, and requires that XML processors read XML elements encoded,
at minimum, using the UTF-8 RFC2279 [5] and UTF-16 encodings of the at minimum, using the UTF-8 RFC2279 [4] and UTF-16 encodings of the
ISO 10646 multilingual plane. XML examples in this specification ISO 10646 multilingual plane. XML examples in this specification
demonstrate use of the charset parameter of the Content-Type header, demonstrate use of the charset parameter of the Content-Type header,
as defined in RFC2376 [17], as well as the XML declarations which as defined in RFC2376 [13], as well as the XML declarations which
provide charset identification information for MIME and XML provide charset identification information for MIME and XML
processors. processors.
XML also provides a language tagging capability for specifying the XML also provides a language tagging capability for specifying the
language of the contents of a particular XML element. The "xml:lang" language of the contents of a particular XML element. The "xml:lang"
attribute appears on an XML element to identify the language of its attribute appears on an XML element to identify the language of its
content and attributes. See XML [11] for definitions of values and content and attributes. See XML [11] for definitions of values and
scoping. scoping.
WebDAV applications MUST support the character set tagging, character WebDAV applications MUST support the character set tagging, character
set encoding, and the language tagging functionality of the XML set encoding, and the language tagging functionality of the XML
specification. Implementors of WebDAV applications are strongly specification. Implementors of WebDAV applications are strongly
encouraged to read "XML Media Types" RFC2376 [17] for instruction on encouraged to read "XML Media Types" RFC2376 [13] for instruction on
which MIME media type to use for XML transport, and on use of the which MIME media type to use for XML transport, and on use of the
charset parameter of the Content-Type header. charset parameter of the Content-Type header.
Names used within this specification fall into four categories: names Names used within this specification fall into four categories: names
of protocol elements such as methods and headers, names of XML of protocol elements such as methods and headers, names of XML
elements, names of properties, and names of conditions. Naming of elements, names of properties, and names of conditions. Naming of
protocol elements follows the precedent of HTTP, using English names protocol elements follows the precedent of HTTP, using English names
encoded in USASCII for methods and headers. Since these protocol encoded in USASCII for methods and headers. Since these protocol
elements are not visible to users, and are simply long token elements are not visible to users, and are simply long token
identifiers, they do not need to support multiple languages. identifiers, they do not need to support multiple languages.
skipping to change at page 95, line 11 skipping to change at page 107, line 11
Since interoperation of clients and servers does not require locale Since interoperation of clients and servers does not require locale
information, this specification does not specify any mechanism for information, this specification does not specify any mechanism for
transmission of this information. transmission of this information.
19. Security Considerations 19. Security Considerations
This section is provided to detail issues concerning security This section is provided to detail issues concerning security
implications of which WebDAV applications need to be aware. implications of which WebDAV applications need to be aware.
All of the security considerations of HTTP/1.1 (discussed in RFC2616 All of the security considerations of HTTP/1.1 (discussed in RFC2616
[8]) and XML (discussed in RFC2376 [17]) also apply to WebDAV. In [7]) and XML (discussed in RFC2376 [13]) also apply to WebDAV. In
addition, the security risks inherent in remote authoring require addition, the security risks inherent in remote authoring require
stronger authentication technology, introduce several new privacy stronger authentication technology, introduce several new privacy
concerns, and may increase the hazards from poor server design. concerns, and may increase the hazards from poor server design.
These issues are detailed below. These issues are detailed below.
19.1 Authentication of Clients 19.1 Authentication of Clients
Due to their emphasis on authoring, WebDAV servers need to use Due to their emphasis on authoring, WebDAV servers need to use
authentication technology to protect not just access to a network authentication technology to protect not just access to a network
resource, but the integrity of the resource as well. Furthermore, resource, but the integrity of the resource as well. Furthermore,
skipping to change at page 95, line 40 skipping to change at page 107, line 40
authenticate a WebDAV client to a server unless the connection is authenticate a WebDAV client to a server unless the connection is
secure. Furthermore, a WebDAV server MUST NOT send Basic secure. Furthermore, a WebDAV server MUST NOT send Basic
authentication credentials in a WWW-Authenticate header unless the authentication credentials in a WWW-Authenticate header unless the
connection is secure. Examples of secure connections include a connection is secure. Examples of secure connections include a
Transport Layer Security (TLS) connection employing a strong cipher Transport Layer Security (TLS) connection employing a strong cipher
suite with mutual authentication of client and server, or a suite with mutual authentication of client and server, or a
connection over a network which is physically secure, for example, an connection over a network which is physically secure, for example, an
isolated network in a building with restricted access. isolated network in a building with restricted access.
WebDAV applications MUST support the Digest authentication scheme WebDAV applications MUST support the Digest authentication scheme
RFC2069 [2]. Since Digest authentication verifies that both parties RFC2069 [1]. Since Digest authentication verifies that both parties
to a communication know a shared secret, a password, without having to a communication know a shared secret, a password, without having
to send that secret in the clear, Digest authentication avoids the to send that secret in the clear, Digest authentication avoids the
security problems inherent in Basic authentication while providing a security problems inherent in Basic authentication while providing a
level of authentication which is useful in a wide range of scenarios. level of authentication which is useful in a wide range of scenarios.
19.2 Denial of Service 19.2 Denial of Service
Denial of service attacks are of special concern to WebDAV servers. Denial of service attacks are of special concern to WebDAV servers.
WebDAV plus HTTP enables denial of service attacks on every part of a WebDAV plus HTTP enables denial of service attacks on every part of a
system's resources. system's resources.
skipping to change at page 97, line 23 skipping to change at page 109, line 23
validating XML, such as the XML used in this specification, including validating XML, such as the XML used in this specification, including
an external XML entity is not required by XML [11]. However, XML an external XML entity is not required by XML [11]. However, XML
[11] does state that an XML processor may, at its discretion, include [11] does state that an XML processor may, at its discretion, include
the external XML entity. the external XML entity.
External XML entities have no inherent trustworthiness and are External XML entities have no inherent trustworthiness and are
subject to all the attacks that are endemic to any HTTP GET request. subject to all the attacks that are endemic to any HTTP GET request.
Furthermore, it is possible for an external XML entity to modify the Furthermore, it is possible for an external XML entity to modify the
DTD, and hence affect the final form of an XML document, in the worst DTD, and hence affect the final form of an XML document, in the worst
case significantly modifying its semantics, or exposing the XML case significantly modifying its semantics, or exposing the XML
processor to the security risks discussed in RFC2376 [17]. processor to the security risks discussed in RFC2376 [13].
Therefore, implementers must be aware that external XML entities Therefore, implementers must be aware that external XML entities
should be treated as untrustworthy. If a server implementor chooses should be treated as untrustworthy. If a server implementor chooses
not to handle external XML entities, it SHOULD respond to requests not to handle external XML entities, it SHOULD respond to requests
containing external entities with the precondition defined above containing external entities with the precondition defined above
(external-entities-forbidden). (external-entities-forbidden).
There is also the scalability risk that would accompany a widely There is also the scalability risk that would accompany a widely
deployed application which made use of external XML entities. In deployed application which made use of external XML entities. In
this situation, it is possible that there would be significant this situation, it is possible that there would be significant
numbers of requests for one external XML entity, potentially numbers of requests for one external XML entity, potentially
overloading any server which fields requests for the resource overloading any server which fields requests for the resource
containing the external XML entity. containing the external XML entity.
19.7 Risks Connected with Lock Tokens 19.7 Risks Connected with Lock Tokens
This specification, in section 6.4, requires the use of Universal This specification requires the use of Universal Unique Identifiers
Unique Identifiers (UUIDs) for lock tokens, in order to guarantee (UUIDs) [9] for lock tokens, in order to guarantee their uniqueness
their uniqueness across space and time. UUIDs, as defined in across space and time. The security considerations for UUIDs do not
ISO-11578 [12], contain a "node" field which "consists of the IEEE apply because WebDAV does not assume that lock tokens are supposed to
address, usually the host address. For systems with multiple IEEE be hard to guess or require integrity. In addition, UUIDs MAY
802 nodes, any available node address can be used." Since a WebDAV contain a IEEE 802 node ID, usually the host address. Since a WebDAV
server will issue many locks over its lifetime, the implication is server will issue many locks over its lifetime, the use of node IDs
that it will also be publicly exposing its IEEE 802 address. might cause the WebDAV server to reveal its IEEE 802 address.
Several risks are related to this:
There are several risks associated with exposure of IEEE 802
addresses. Using the IEEE 802 address:
o It is possible to track the movement of hardware from subnet to o It is possible to track the movement of hardware from subnet to
subnet. subnet.
o It may be possible to identify the manufacturer of the hardware o It may be possible to identify the manufacturer of the hardware
running a WebDAV server. running a WebDAV server.
o It may be possible to determine the number of each type of o It may be possible to determine the number of each type of
computer running WebDAV. computer running WebDAV.
Section 24.2 of this specification details an alternate mechanism for
generating the "node" field of a UUID without using an IEEE 802
address, which alleviates the risks associated with exposure of IEEE
802 addresses by using an alternate source of uniqueness.
20. IANA Considerations 20. IANA Considerations
This document defines two namespaces, the namespace of property This document defines two namespaces, the namespace of property
names, and the namespace of WebDAV-specific XML elements used within names, and the namespace of WebDAV-specific XML elements used within
property values. property values.
The use of XML namespaces means that unique WebDAV property names and The use of XML namespaces means that unique WebDAV property names and
XML elements can be quickly defined by any WebDAV user or XML elements can be quickly defined by any WebDAV user or
application, without requiring IANA action. application, without requiring IANA action.
skipping to change at page 100, line 51 skipping to change at page 112, line 51
Steve Carter and D. Jensen. Although their names had to be removed Steve Carter and D. Jensen. Although their names had to be removed
due to IETF author count restrictions they can take credit for the due to IETF author count restrictions they can take credit for the
majority of the design of WebDAV. majority of the design of WebDAV.
Additional Contributors to This Specification Additional Contributors to This Specification
Valuable contributions to RFC2518 bis came from some already named. Valuable contributions to RFC2518 bis came from some already named.
New contributors must also be gratefully acknowledged. Julian New contributors must also be gratefully acknowledged. Julian
Reschke, Geoff Clemm, Joel Soderberg, and Dan Brotsky hashed out Reschke, Geoff Clemm, Joel Soderberg, and Dan Brotsky hashed out
specific text on the list or in meetings. Ilya Kirnos supplied text specific text on the list or in meetings. Ilya Kirnos supplied text
for Force-Authentication header. Joe Hildebrand contributed as for Force-Authentication header. Joe Hildebrand contributed as co-
co-chair. chair.
22. References 22. References
22.1 Normative References 22.1 Normative References
[1] Noble, B., Nguyen, G., Satyanarayanan, M. and R. Katz, "Mobile [1] Franks, J., Hallam-Baker, P., Hostetler, J., Leach, P.,
Network Tracing", RFC 2041, October 1996. Luotonen, A., Sink, E., and L. Stewart, "An Extension to HTTP :
[2] Franks, J., Hallam-Baker, P., Hostetler, J., Leach, P.,
Luotonen, A., Sink, E. and L. Stewart, "An Extension to HTTP :
Digest Access Authentication", RFC 2069, January 1997. Digest Access Authentication", RFC 2069, January 1997.
[3] Bradner, S., "Key words for use in RFCs to Indicate Requirement [2] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997. Levels", BCP 14, RFC 2119, March 1997.
[4] Alvestrand, H., "IETF Policy on Character Sets and Languages", [3] Alvestrand, H., "IETF Policy on Character Sets and Languages",
BCP 18, RFC 2277, January 1998. BCP 18, RFC 2277, January 1998.
[5] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC [4] Yergeau, F., "UTF-8, a transformation format of ISO 10646",
2279, January 1998. RFC 2279, January 1998.
[6] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform [5] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifiers (URI): Generic Syntax", RFC 2396, August Resource Identifiers (URI): Generic Syntax", RFC 2396,
1998. August 1998.
[7] Goland, Y., Whitehead, E., Faizi, A., Carter, S. and D. Jensen, [6] Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D.
"HTTP Extensions for Distributed Authoring -- WEBDAV", RFC Jensen, "HTTP Extensions for Distributed Authoring -- WEBDAV",
2518, February 1999. RFC 2518, February 1999.
[8] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., [7] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L.,
Leach, P. and T. Berners-Lee, "Hypertext Transfer Protocol -- Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol --
HTTP/1.1", RFC 2616, June 1999. HTTP/1.1", RFC 2616, June 1999.
[9] Klyne, G. and C. Newman, "Date and Time on the Internet: [8] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, July 2002. Timestamps", RFC 3339, July 2002.
[10] Bray, T., Hollander, D. and A. Layman, "Namespaces in XML", W3C [9] Leach, P., Mealling, M., and R. Salz, "A Universally Unique
REC REC-xml-names-19990114, January 1999. IDentifier (UUID) URN Namespace", RFC 4122, July 2005.
[11] Bray, T., Paoli, J., Sperberg-McQueen, C. and E. Maler, [10] Hollander, D., Bray, T., and A. Layman, "Namespaces in XML",
W3C REC REC-xml-names-19990114, January 1999.
[11] Paoli, J., Sperberg-McQueen, C., Bray, T., and E. Maler,
"Extensible Markup Language (XML) 1.0 (Second Edition)", W3C "Extensible Markup Language (XML) 1.0 (Second Edition)", W3C
FirstEdition REC-xml-20001006, October 2000. FirstEdition REC-xml-20001006, October 2000.
[12] International Organization for Standardization, "Information
technology - Open Systems Interconnection - Remote Procedure
Call (RPC)", ISO Standard 11578, 1996.
22.2 Informational References 22.2 Informational References
[13] Bradner, S., "The Internet Standards Process -- Revision 3", [12] Slein, J., Vitali, F., Whitehead, E., and D. Durand,
BCP 9, RFC 2026, October 1996.
[14] Lasher, R. and D. Cohen, "A Format for Bibliographic Records",
RFC 1807, June 1995.
[15] Slein, J., Vitali, F., Whitehead, E. and D. Durand,
"Requirements for a Distributed Authoring and Versioning "Requirements for a Distributed Authoring and Versioning
Protocol for the World Wide Web", RFC 2291, February 1998. Protocol for the World Wide Web", RFC 2291, February 1998.
[16] Weibel, S., Kunze, J., Lagoze, C. and M. Wolf, "Dublin Core [13] Whitehead, E. and M. Makoto, "XML Media Types", RFC 2376,
Metadata for Resource Discovery", RFC 2413, September 1998. July 1998.
[17] Whitehead, E. and M. Makoto, "XML Media Types", RFC 2376, July
1998.
[18] Clemm, G., Amsden, J., Ellison, T., Kaler, C. and J. Whitehead, [14] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J.
"Versioning Extensions to WebDAV (Web Distributed Authoring and Whitehead, "Versioning Extensions to WebDAV (Web Distributed
Versioning)", RFC 3253, March 2002. Authoring and Versioning)", RFC 3253, March 2002.
[19] Clemm, G., Reschke, J., Sedlar, E. and J. Whitehead, "Web [15] Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web
Distributed Authoring and Versioning (WebDAV) Access Control Distributed Authoring and Versioning (WebDAV) Access Control
Protocol", RFC 3744, May 2004. Protocol", RFC 3744, May 2004.
[20] Krauskopf, T., Miller, J., Resnick, P. and W. Treese, "PICS 1.1
Label Distribution -- Label Syntax and Communication
Protocols", W3C REC REC-PICS-labels-961031, October 1996.
[21] Lagoze, C., "The Warwick Framework: A Container Architecture
for Diverse Sets of Metadata", July/August 1996, <http://
www.dlib.org/dlib/july96/lagoze/07lagoze.html>.
[22] Cataloging Distribution Service, Library of Congress,
Washington, DC, "Network Development and MARC Standards,
Office, ed. 1994. "USMARC Format for Bibliographic Data"",
1994.
Authors' Addresses Authors' Addresses
Lisa Dusseault Lisa Dusseault
Open Source Application Foundation Open Source Application Foundation
2064 Edgewood Dr. 2064 Edgewood Dr.
Palo Alto, CA 94303 Palo Alto, CA 94303
US US
EMail: lisa@osafoundation.org Email: lisa@osafoundation.org
Jason L Crawford Jason L Crawford
IBM IBM
P.O.Box 704 P.O.Box 704
Yorktown Heights, NY 10598 Yorktown Heights, NY 10598
US US
EMail: nnjason8451@smallcue.com Email: nnjason8451@smallcue.com
Appendix A. Previous Authors' Addresses Appendix A. Previous Authors' Addresses
Editors of RFC2518 Editors of RFC2518
Y. Y. Goland Microsoft Corporation One Microsoft Way Redmond, WA Y. Y. Goland Microsoft Corporation One Microsoft Way Redmond, WA
98052-6399 Email: yarong@microsoft.com 98052-6399 Email: yarong@microsoft.com
E. J. Whitehead, Jr. Dept. Of Information and Computer Science E. J. Whitehead, Jr. Dept. Of Information and Computer Science
University of California, Irvine Irvine, CA 92697-3425 Email: University of California, Irvine Irvine, CA 92697-3425 Email:
ejw@ics.uci.edu ejw@ics.uci.edu
A. Faizi Netscape 685 East Middlefield Road Mountain View, CA 94043 A. Faizi Netscape 685 East Middlefield Road Mountain View, CA 94043
Email: asad@netscape.com Email: asad@netscape.com
S. R. Carter Novell 1555 N. Technology Way M/S ORM F111 Orem, UT S. R. Carter Novell 1555 N. Technology Way M/S ORM F111 Orem, UT
84097-2399 Email: srcarter@novell.com 84097-2399 Email: srcarter@novell.com
D. Jensen Novell 1555 N. Technology Way M/S ORM F111 Orem, UT D. Jensen Novell 1555 N. Technology Way M/S ORM F111 Orem, UT 84097-
84097-2399 Email: dcjensen@novell.com 2399 Email: dcjensen@novell.com
Appendix B. Appendices Appendix B. Appendices
B.1 Appendix 1 - Notes on Processing XML Elements B.1 Appendix 1 - Notes on Processing XML Elements
B.1.1 Notes on Empty XML Elements B.1.1 Notes on Empty XML Elements
XML supports two mechanisms for indicating that an XML element does XML supports two mechanisms for indicating that an XML element does
not have any content. The first is to declare an XML element of the not have any content. The first is to declare an XML element of the
form <A></A>. The second is to declare an XML element of the form form <A></A>. The second is to declare an XML element of the form
skipping to change at page 107, line 6 skipping to change at page 118, line 6
<D:propname/> <D:propname/>
<E:leave-out>*boss*</E:leave-out> <E:leave-out>*boss*</E:leave-out>
</D:propfind> </D:propfind>
The previous example contains the fictitious element leave-out. Its The previous example contains the fictitious element leave-out. Its
purpose is to prevent the return of any property whose name matches purpose is to prevent the return of any property whose name matches
the submitted pattern. If the previous example were submitted to a the submitted pattern. If the previous example were submitted to a
server unfamiliar with leave-out, the only result would be that the server unfamiliar with leave-out, the only result would be that the
leave-out element would be ignored and a propname would be executed. leave-out element would be ignored and a propname would be executed.
B.2 Appendix 2: UUID Node Generation B.2 Appendix 3: Notes on HTTP Client Compatibility
UUIDs, as defined in ISO-11578 [12], contain a "node" field that
contains one of the IEEE 802 addresses for the server machine. As
noted in section 18, there are several security risks associated with
exposing a machine's IEEE 802 address. This section provides an
alternate mechanism for generating the "node" field of a UUID which
does not employ an IEEE 802 address. WebDAV servers MAY use this
algorithm for creating the node field when generating UUIDs. The
text in this section is originally from an Internet-Draft by Paul
Leach and Rich Salz, who are noted here to properly attribute their
work.
The ideal solution is to obtain a 47 bit cryptographic quality random
number, and use it as the low 47 bits of the node ID, with the most
significant bit of the first octet of the node ID set to 1. This bit
is the unicast/multicast bit, which will never be set in IEEE 802
addresses obtained from network cards; hence, there can never be a
conflict between UUIDs generated by machines with and without network
cards.
If a system does not have a primitive to generate cryptographic
quality random numbers, then in most systems there are usually a
fairly large number of sources of randomness available from which one
can be generated. Such sources are system specific, but often
include:
- the percent of memory in use - the size of main memory in bytes - The PUT and DELETE methods are defined in HTTP and thus may be used
the amount of free main memory in bytes - the size of the paging or by HTTP clients, but the responses to PUT and DELETE have been
swap file in bytes - free bytes of paging or swap file - the total extended in this specification, so some special consideration on
size of user virtual address space in bytes - the total available backward compatibility is worthwhile.
user address space bytes - the size of boot disk drive in bytes - the
free disk space on boot drive in bytes - the current time - the
amount of time since the system booted - the individual sizes of
files in various system directories - the creation, last read, and
modification times of files in various system directories - the
utilization factors of various system resources (heap, etc.) -
current mouse cursor position - current caret position - current
number of running processes, threads - handles or IDs of the desktop
window and the active window - the value of stack pointer of the
caller - the process and thread ID of caller - various processor
architecture specific performance counters (instructions executed,
cache misses, TLB misses)
(Note that it is precisely the above kinds of sources of randomness First, if a PUT or DELETE request includes a header defined in this
that are used to seed cryptographic quality random number generators specification (Depth or If), the server can assume the request comes
on systems without special hardware for their construction.) from a WebDAV-compatible client. The server may even be able to
track a number of requests across a session and know that a client is
a WebDAV client. However, this kind of detection may not be
necessary.
In addition, items such as the computer's name and the name of the Since any HTTP client ought to handle unrecognized 400-level and 500-
operating system, while not strictly speaking random, will help level status codes as errors, the following new status codes should
differentiate the results from those obtained by other systems. not present any issues: 422, 423 and 507. 424 is also a new status
code but it appears only in the body of a Multistatus response. So,
for example, if a HTTP client attempted to PUT or DELETE a locked
resource, the 423 Locked response ought to result in a generic error
presented to the user.
The exact algorithm to generate a node ID using these data is system The 102 Processing response code is new, and indicates that the
specific, because both the data available and the functions to obtain client may wish to extend its normal timeout period. However, the
them are often very system specific. However, assuming that one can choice to extend the timeout period is entirely optional, and thus a
concatenate all the values from the randomness sources into a buffer, HTTP client receiving a 102 Processing status response may time out
and that a cryptographic hash function such as MD5 is available, then anyway, with no avoidable adverse effects.
any 6 bytes of the MD5 hash of the buffer, with the multicast bit
(the high bit of the first byte) set will be an appropriately random
node ID.
Other hash functions, such as SHA-1, can also be used. The only The 207 Multistatus response is interesting because a HTTP client
requirement is that the result be suitably random, in the sense that issuing a DELETE request to a collection might interpret a 207
the outputs from a set uniformly distributed inputs are themselves response as a success, even though it does not realize the resource
uniformly distributed, and that a single bit change in the input can is a collection and cannot understand that the DELETE operation might
be expected to cause half of the output bits to change. have been a complete or partial failure. Thus, a server MAY choose
to treat a DELETE of a collection as an atomic operation, and use
either 204 No Content in case of success, or some appropriate error
response (400 or 500 level) depending on what the error was. This
approach would maximize backward compatibility. However, since
interoperability tests and working group discussions have not turned
up any instances of HTTP clients issuing a DELETE request against a
WebDAV collection, this concern may be more theoretical than
practical. Thus, servers MAY instead choose to treat any such DELETE
request as a WebDAV request, and send a 207 Multistatus containing
more detail about what resources could not be deleted.
B.3 Changes B.3 Changes
B.3.1 Changes in -01 B.3.1 Changes in -06
B.3.2 Changes in -06
Specified that a successful LOCK request to an unmapped URL creates a Specified that a successful LOCK request to an unmapped URL creates a
new, empty locked resource. new, empty locked resource.
Resolved UNLOCK_NEEDS_IF_HEADER by clarifying that only Lock-Token Resolved UNLOCK_NEEDS_IF_HEADER by clarifying that only Lock-Token
header is needed on UNLOCK. header is needed on UNLOCK.
Added Section 15 on preconditions and postconditions and defined a Added Section 15 on preconditions and postconditions and defined a
number of preconditions and postconditions. The 'missing-lock-token' number of preconditions and postconditions. The 'missing-lock-token'
precondition resolves the REPORT_OTHER_RESOURCE_LOCKED issue. precondition resolves the REPORT_OTHER_RESOURCE_LOCKED issue.
skipping to change at page 109, line 4 skipping to change at page 119, line 30
collection lock in the If header section. collection lock in the If header section.
Removed ability for Destination header to take "abs_path" in order to Removed ability for Destination header to take "abs_path" in order to
keep consistent with other places where client provides URLs (If keep consistent with other places where client provides URLs (If
header, href element in request body) header, href element in request body)
Clarified the href element - that it generally contains HTTP URIs but Clarified the href element - that it generally contains HTTP URIs but
not always. not always.
Attempted to fix the BNF describing the If header to allow commas Attempted to fix the BNF describing the If header to allow commas
Clarified presence of Depth header on LOCK refresh requests. Clarified presence of Depth header on LOCK refresh requests.
B.3.2 Changes in -07
Added text to "COPY and the Overwrite Header" section to resolve
issue OVERWRITE_DELETE_ALL_TOO_STRONG.
Added text to "HTTP URL Namespace Model" section to provide more
clarification and examples on what consistency means and what is not
required, to resolve issue CONSISTENCY.
Resolve DEFINE_PRINCIPAL by importing definition of principal from
RFC3744.
Resolve INTEROP_DELETE_AND_MULTISTATUS by adding appendix 3
discussing backward-compatibility concerns.
Resolve DATE_FORMAT_GETLASTMODIFIED by allowing only rfc1123-date,
not HTTP-date for getlastmodified.
Resolve COPY_INTO_YOURSELF_CLARIFY by adding sentence to first para.
of COPY section.
Confirm that WHEN_TO_MULTISTATUS_FOR_DELETE_1 and
WHEN_TO_MULTISTATUS_FOR_DELETE_2 are resolved and tweak language in
DELETE section slightly to be clearly consistent.
More text clarifications to deal with several of the issues in
LOCK_ISSUES. This may not completely resolve that set but we need
feedback from the originator of the issues at this point.
Resolved COPY_INTO_YOURSELF_CLARIFY with new sentence in Copy For
Collections section.
Double checked that LEVEL_OR_CLASS is resolved by using class, not
level.
Further work to resolve IF_AND_AUTH and LOCK_SEMANTICS, clarifying
text on using locks and being authenticated.
Added notes on use of 503 status response to resolve issue
PROPFIND_INFINITY
Removed section on other uses of Metadata (and associated references)
Added reference to RFC4122 for lock tokens and removed section on
generating UUIDs
Explained that even with language variation, a property has only one
value (section 4.5).
Added section on lock owner (7.1) and what to do if lock requested by
unauthenticated user
Removed section 4.2 -- justification on why to have metadata, not
needed now
Removed paragraph in section 5.2 about collections with resource type
"DAV:collection" but which are non-WebDAV compliant -- not
implemented.
Intellectual Property Statement Intellectual Property Statement
The IETF takes no position regarding the validity or scope of any The IETF takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights this document or the extent to which any license under such rights
might or might not be available; neither does it represent that it might or might not be available; nor does it represent that it has
has made any effort to identify any such rights. Information on the made any independent effort to identify any such rights. Information
IETF's procedures with respect to rights in standards-track and on the procedures with respect to rights in RFC documents can be
standards-related documentation can be found in BCP-11. Copies of found in BCP 78 and BCP 79.
claims of rights made available for publication and any assurances of
licenses to be made available, or the result of an attempt made to Copies of IPR disclosures made to the IETF Secretariat and any
obtain a general license or permission for the use of such assurances of licenses to be made available, or the result of an
proprietary rights by implementors or users of this specification can attempt made to obtain a general license or permission for the use of
be obtained from the IETF Secretariat. such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to practice rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF Executive this standard. Please address the information to the IETF at
Director. ietf-ipr@ietf.org.
Full Copyright Statement
Copyright (C) The Internet Society (2004). All Rights Reserved. Disclaimer of Validity
This document and translations of it may be copied and furnished to This document and the information contained herein are provided on an
others, and derivative works that comment on or otherwise explain it "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
or assist in its implementation may be prepared, copied, published OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
and distributed, in whole or in part, without restriction of any ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
kind, provided that the above copyright notice and this paragraph are INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
included on all such copies and derivative works. However, this INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
document itself may not be modified in any way, such as by removing WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be Copyright Statement
revoked by the Internet Society or its successors or assignees.
This document and the information contained herein is provided on an Copyright (C) The Internet Society (2005). This document is subject
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING to the rights, licenses and restrictions contained in BCP 78, and
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING except as set forth therein, the authors retain all their rights.
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgment Acknowledgment
Funding for the RFC Editor function is currently provided by the Funding for the RFC Editor function is currently provided by the
Internet Society. Internet Society.
 End of changes. 

This html diff was produced by rfcdiff 1.25, available from http://www.levkowetz.com/ietf/tools/rfcdiff/