draft-ietf-webdav-rfc2518bis-14.txt   draft-ietf-webdav-rfc2518bis-15.txt 
WebDAV L. Dusseault, Ed. WebDAV L. Dusseault, Ed.
Internet-Draft OSAF Internet-Draft OSAF
Obsoletes: 2518 (if approved) February 14, 2006
Intended status: Standards Track Intended status: Standards Track
Expires: August 18, 2006 Expires: October 3, 2006
HTTP Extensions for Distributed Authoring - WebDAV HTTP Extensions for Distributed Authoring - WebDAV
draft-ietf-webdav-rfc2518bis-14 draft-ietf-webdav-rfc2518bis-15
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware 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 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. 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
skipping to change at page 1, line 35 skipping to change at page 1, line 35
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 The list of current Internet-Drafts can be accessed at
http://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 August 18, 2006. This Internet-Draft will expire on October 3, 2006.
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, URL namespace creation and management of resource collections, URL namespace
manipulation, and resource locking (collision avoidance). manipulation, and resource locking (collision avoidance).
RFC2518 was published in February 1999, and this specification makes RFC2518 was published in February 1999, and this specification makes
minor revisions mostly due to interoperability experience. minor revisions mostly due to interoperability experience.
skipping to change at page 2, line 39 skipping to change at page 2, line 39
5.2. Collection Resources . . . . . . . . . . . . . . . . . . 18 5.2. Collection Resources . . . . . . . . . . . . . . . . . . 18
6. Locking . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 6. Locking . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.1. Lock Model . . . . . . . . . . . . . . . . . . . . . . . 21 6.1. Lock Model . . . . . . . . . . . . . . . . . . . . . . . 21
6.2. Exclusive Vs. Shared Locks . . . . . . . . . . . . . . . 22 6.2. Exclusive Vs. Shared Locks . . . . . . . . . . . . . . . 22
6.3. Required Support . . . . . . . . . . . . . . . . . . . . 23 6.3. Required Support . . . . . . . . . . . . . . . . . . . . 23
6.4. Lock Creator and Privileges . . . . . . . . . . . . . . 23 6.4. Lock Creator and Privileges . . . . . . . . . . . . . . 23
6.5. Lock Tokens . . . . . . . . . . . . . . . . . . . . . . 24 6.5. Lock Tokens . . . . . . . . . . . . . . . . . . . . . . 24
6.6. Lock Timeout . . . . . . . . . . . . . . . . . . . . . . 25 6.6. Lock Timeout . . . . . . . . . . . . . . . . . . . . . . 25
6.7. Lock Capability Discovery . . . . . . . . . . . . . . . 25 6.7. Lock Capability Discovery . . . . . . . . . . . . . . . 25
6.8. Active Lock Discovery . . . . . . . . . . . . . . . . . 26 6.8. Active Lock Discovery . . . . . . . . . . . . . . . . . 26
6.9. Locks and Multiple Bindings . . . . . . . . . . . . . . 26
7. Write Lock . . . . . . . . . . . . . . . . . . . . . . . . . 27 7. Write Lock . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.1. Write Locks and Properties . . . . . . . . . . . . . . . 27 7.1. Write Locks and Properties . . . . . . . . . . . . . . . 27
7.2. Avoiding Lost Updates . . . . . . . . . . . . . . . . . 28 7.2. Avoiding Lost Updates . . . . . . . . . . . . . . . . . 28
7.3. Write Locks and Unmapped URLs . . . . . . . . . . . . . 29 7.3. Write Locks and Unmapped URLs . . . . . . . . . . . . . 29
7.4. Write Locks and Collections . . . . . . . . . . . . . . 31 7.4. Write Locks and Collections . . . . . . . . . . . . . . 30
7.5. Write Locks and the If Request Header . . . . . . . . . 32 7.5. Write Locks and the If Request Header . . . . . . . . . 31
7.5.1. Example - Write Lock and COPY . . . . . . . . . . . 33 7.5.1. Example - Write Lock and COPY . . . . . . . . . . . 32
7.5.2. Example - Deleting a member of a locked collection . 33 7.5.2. Example - Deleting a member of a locked collection . 32
7.6. Write Locks and COPY/MOVE . . . . . . . . . . . . . . . 34 7.6. Write Locks and COPY/MOVE . . . . . . . . . . . . . . . 33
7.7. Refreshing Write Locks . . . . . . . . . . . . . . . . . 35 7.7. Refreshing Write Locks . . . . . . . . . . . . . . . . . 34
8. General Request and Response Handling . . . . . . . . . . . . 36 8. General Request and Response Handling . . . . . . . . . . . . 35
8.1. Precedence in Error Handling . . . . . . . . . . . . . . 36 8.1. Precedence in Error Handling . . . . . . . . . . . . . . 35
8.2. Use of XML . . . . . . . . . . . . . . . . . . . . . . . 36 8.2. Use of XML . . . . . . . . . . . . . . . . . . . . . . . 35
8.3. URL Handling . . . . . . . . . . . . . . . . . . . . . . 37 8.3. URL Handling . . . . . . . . . . . . . . . . . . . . . . 36
8.3.1. Example - Correct URL Handling . . . . . . . . . . . 37 8.3.1. Example - Correct URL Handling . . . . . . . . . . . 36
8.4. Required Bodies in Requests . . . . . . . . . . . . . . 38 8.4. Required Bodies in Requests . . . . . . . . . . . . . . 37
8.5. HTTP Headers for use in WebDAV . . . . . . . . . . . . . 38 8.5. HTTP Headers for use in WebDAV . . . . . . . . . . . . . 37
8.6. ETag . . . . . . . . . . . . . . . . . . . . . . . . . . 38 8.6. ETag . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.7. Including error response bodies . . . . . . . . . . . . 39 8.7. Including error response bodies . . . . . . . . . . . . 38
8.8. Impact of Namespace Operations on Cache Validators . . . 39 8.8. Impact of Namespace Operations on Cache Validators . . . 38
9. HTTP Methods for Distributed Authoring . . . . . . . . . . . 41 9. HTTP Methods for Distributed Authoring . . . . . . . . . . . 40
9.1. PROPFIND Method . . . . . . . . . . . . . . . . . . . . 41 9.1. PROPFIND Method . . . . . . . . . . . . . . . . . . . . 40
9.1.1. PROPFIND status codes . . . . . . . . . . . . . . . 42 9.1.1. PROPFIND status codes . . . . . . . . . . . . . . . 41
9.1.2. Status codes for use with 207 (Multi-Status) . . . . 43 9.1.2. Status Codes for use in 'propstat' Element . . . . . 42
9.1.3. Example - Retrieving Named Properties . . . . . . . 43 9.1.3. Example - Retrieving Named Properties . . . . . . . 42
9.1.4. Example - Retrieving Named and Dead Properties . . . 45 9.1.4. Example - Using so-called 'allprop' . . . . . . . . 44
9.1.5. Example - Using 'propname' to Retrieve all 9.1.5. Example - Using 'propname' to Retrieve all
Property Names . . . . . . . . . . . . . . . . . . . 45 Property Names . . . . . . . . . . . . . . . . . . . 44
9.1.6. Example - Using 'allprop' . . . . . . . . . . . . . 47 9.1.6. Example - Using 'allprop' . . . . . . . . . . . . . 46
9.2. PROPPATCH Method . . . . . . . . . . . . . . . . . . . . 50 9.2. PROPPATCH Method . . . . . . . . . . . . . . . . . . . . 49
9.2.1. Status Codes for use in 207 (Multi-Status) . . . . . 50 9.2.1. Status Codes for use in 'propstat' Element . . . . . 49
9.2.2. Example - PROPPATCH . . . . . . . . . . . . . . . . 51 9.2.2. Example - PROPPATCH . . . . . . . . . . . . . . . . 50
9.3. MKCOL Method . . . . . . . . . . . . . . . . . . . . . . 52 9.3. MKCOL Method . . . . . . . . . . . . . . . . . . . . . . 51
9.3.1. MKCOL Status Codes . . . . . . . . . . . . . . . . . 53 9.3.1. MKCOL Status Codes . . . . . . . . . . . . . . . . . 52
9.3.2. Example - MKCOL . . . . . . . . . . . . . . . . . . 54 9.3.2. Example - MKCOL . . . . . . . . . . . . . . . . . . 53
9.4. GET, HEAD for Collections . . . . . . . . . . . . . . . 54 9.4. GET, HEAD for Collections . . . . . . . . . . . . . . . 53
9.5. POST for Collections . . . . . . . . . . . . . . . . . . 54 9.5. POST for Collections . . . . . . . . . . . . . . . . . . 53
9.6. DELETE Requirements . . . . . . . . . . . . . . . . . . 54 9.6. DELETE Requirements . . . . . . . . . . . . . . . . . . 53
9.6.1. DELETE for Collections . . . . . . . . . . . . . . . 55 9.6.1. DELETE for Collections . . . . . . . . . . . . . . . 54
9.6.2. Example - DELETE . . . . . . . . . . . . . . . . . . 56 9.6.2. Example - DELETE . . . . . . . . . . . . . . . . . . 55
9.7. PUT Requirements . . . . . . . . . . . . . . . . . . . . 56 9.7. PUT Requirements . . . . . . . . . . . . . . . . . . . . 55
9.7.1. PUT for Non-Collection Resources . . . . . . . . . . 56 9.7.1. PUT for Non-Collection Resources . . . . . . . . . . 55
9.7.2. PUT for Collections . . . . . . . . . . . . . . . . 57 9.7.2. PUT for Collections . . . . . . . . . . . . . . . . 56
9.8. COPY Method . . . . . . . . . . . . . . . . . . . . . . 57 9.8. COPY Method . . . . . . . . . . . . . . . . . . . . . . 56
9.8.1. COPY for Non-collection Resources . . . . . . . . . 57 9.8.1. COPY for Non-collection Resources . . . . . . . . . 56
9.8.2. COPY for Properties . . . . . . . . . . . . . . . . 58 9.8.2. COPY for Properties . . . . . . . . . . . . . . . . 57
9.8.3. COPY for Collections . . . . . . . . . . . . . . . . 58 9.8.3. COPY for Collections . . . . . . . . . . . . . . . . 57
9.8.4. COPY and Overwriting Destination Resources . . . . . 59 9.8.4. COPY and Overwriting Destination Resources . . . . . 58
9.8.5. Status Codes . . . . . . . . . . . . . . . . . . . . 60 9.8.5. Status Codes . . . . . . . . . . . . . . . . . . . . 59
9.8.6. Example - COPY with Overwrite . . . . . . . . . . . 61 9.8.6. Example - COPY with Overwrite . . . . . . . . . . . 60
9.8.7. Example - COPY with No Overwrite . . . . . . . . . . 61 9.8.7. Example - COPY with No Overwrite . . . . . . . . . . 60
9.8.8. Example - COPY of a Collection . . . . . . . . . . . 62 9.8.8. Example - COPY of a Collection . . . . . . . . . . . 61
9.9. MOVE Method . . . . . . . . . . . . . . . . . . . . . . 63 9.9. MOVE Method . . . . . . . . . . . . . . . . . . . . . . 62
9.9.1. MOVE for Properties . . . . . . . . . . . . . . . . 63 9.9.1. MOVE for Properties . . . . . . . . . . . . . . . . 62
9.9.2. MOVE for Collections . . . . . . . . . . . . . . . . 64 9.9.2. MOVE for Collections . . . . . . . . . . . . . . . . 63
9.9.3. MOVE and the Overwrite Header . . . . . . . . . . . 65 9.9.3. MOVE and the Overwrite Header . . . . . . . . . . . 64
9.9.4. Status Codes . . . . . . . . . . . . . . . . . . . . 65 9.9.4. Status Codes . . . . . . . . . . . . . . . . . . . . 64
9.9.5. Example - MOVE of a Non-Collection . . . . . . . . . 66 9.9.5. Example - MOVE of a Non-Collection . . . . . . . . . 65
9.9.6. Example - MOVE of a Collection . . . . . . . . . . . 66 9.9.6. Example - MOVE of a Collection . . . . . . . . . . . 65
9.10. LOCK Method . . . . . . . . . . . . . . . . . . . . . . 67 9.10. LOCK Method . . . . . . . . . . . . . . . . . . . . . . 66
9.10.1. Creating a lock on existing resource . . . . . . . . 67 9.10.1. Creating a lock on existing resource . . . . . . . . 66
9.10.2. Refreshing Locks . . . . . . . . . . . . . . . . . . 68 9.10.2. Refreshing Locks . . . . . . . . . . . . . . . . . . 67
9.10.3. Depth and Locking . . . . . . . . . . . . . . . . . 68 9.10.3. Depth and Locking . . . . . . . . . . . . . . . . . 67
9.10.4. Locking Unmapped URLs . . . . . . . . . . . . . . . 69 9.10.4. Locking Unmapped URLs . . . . . . . . . . . . . . . 68
9.10.5. Lock Compatibility Table . . . . . . . . . . . . . . 69 9.10.5. Lock Compatibility Table . . . . . . . . . . . . . . 68
9.10.6. LOCK Responses . . . . . . . . . . . . . . . . . . . 70 9.10.6. LOCK Responses . . . . . . . . . . . . . . . . . . . 69
9.10.7. Example - Simple Lock Request . . . . . . . . . . . 71 9.10.7. Example - Simple Lock Request . . . . . . . . . . . 70
9.10.8. Example - Refreshing a Write Lock . . . . . . . . . 73 9.10.8. Example - Refreshing a Write Lock . . . . . . . . . 72
9.10.9. Example - Multi-Resource Lock Request . . . . . . . 74 9.10.9. Example - Multi-Resource Lock Request . . . . . . . 73
9.11. UNLOCK Method . . . . . . . . . . . . . . . . . . . . . 75 9.11. UNLOCK Method . . . . . . . . . . . . . . . . . . . . . 74
9.11.1. Status Codes . . . . . . . . . . . . . . . . . . . . 76 9.11.1. Status Codes . . . . . . . . . . . . . . . . . . . . 74
9.11.2. Example - UNLOCK . . . . . . . . . . . . . . . . . . 76 9.11.2. Example - UNLOCK . . . . . . . . . . . . . . . . . . 75
10. HTTP Headers for Distributed Authoring . . . . . . . . . . . 77 10. HTTP Headers for Distributed Authoring . . . . . . . . . . . 76
10.1. DAV Header . . . . . . . . . . . . . . . . . . . . . . . 77 10.1. DAV Header . . . . . . . . . . . . . . . . . . . . . . . 76
10.2. Depth Header . . . . . . . . . . . . . . . . . . . . . . 78 10.2. Depth Header . . . . . . . . . . . . . . . . . . . . . . 77
10.3. Destination Header . . . . . . . . . . . . . . . . . . . 79 10.3. Destination Header . . . . . . . . . . . . . . . . . . . 78
10.4. If Header . . . . . . . . . . . . . . . . . . . . . . . 79 10.4. If Header . . . . . . . . . . . . . . . . . . . . . . . 78
10.4.1. Purpose . . . . . . . . . . . . . . . . . . . . . . 79 10.4.1. Purpose . . . . . . . . . . . . . . . . . . . . . . 78
10.4.2. Syntax . . . . . . . . . . . . . . . . . . . . . . . 80 10.4.2. Syntax . . . . . . . . . . . . . . . . . . . . . . . 79
10.4.3. List Evaluation . . . . . . . . . . . . . . . . . . 81 10.4.3. List Evaluation . . . . . . . . . . . . . . . . . . 80
10.4.4. Matching Tokens and ETags . . . . . . . . . . . . . 81 10.4.4. Matching State Tokens and ETags . . . . . . . . . . 80
10.4.5. Example - No-tag Production . . . . . . . . . . . . 82 10.4.5. If Header and Non-DAV Aware Proxies . . . . . . . . 81
10.4.6. Example - using "Not" with No-tag Production . . . . 82 10.4.6. Example - No-tag Production . . . . . . . . . . . . 81
10.4.7. Example - causing a Condition to always evaluate 10.4.7. Example - using "Not" with No-tag Production . . . . 81
10.4.8. Example - causing a Condition to always evaluate
to True . . . . . . . . . . . . . . . . . . . . . . 82 to True . . . . . . . . . . . . . . . . . . . . . . 82
10.4.8. Example - Tagged List If header in COPY . . . . . . 83 10.4.9. Example - Tagged List If header in COPY . . . . . . 82
10.4.9. Example - Matching lock tokens with collection 10.4.10. Example - Matching lock tokens with collection
locks . . . . . . . . . . . . . . . . . . . . . . . 83 locks . . . . . . . . . . . . . . . . . . . . . . . 83
10.4.10. Example - Matching ETags on unmapped URLs . . . . . 84 10.4.11. Example - Matching ETags on unmapped URLs . . . . . 83
10.4.11. If Header and Non-DAV Aware Proxies . . . . . . . . 84 10.5. Lock-Token Header . . . . . . . . . . . . . . . . . . . 83
10.5. Lock-Token Header . . . . . . . . . . . . . . . . . . . 84 10.6. Overwrite Header . . . . . . . . . . . . . . . . . . . . 84
10.6. Overwrite Header . . . . . . . . . . . . . . . . . . . . 85 10.7. Timeout Request Header . . . . . . . . . . . . . . . . . 84
10.7. Timeout Request Header . . . . . . . . . . . . . . . . . 85 11. Status Code Extensions to HTTP/1.1 . . . . . . . . . . . . . 85
11. Status Code Extensions to HTTP/1.1 . . . . . . . . . . . . . 87 11.1. 207 Multi-Status . . . . . . . . . . . . . . . . . . . . 85
11.1. 207 Multi-Status . . . . . . . . . . . . . . . . . . . . 87 11.2. 422 Unprocessable Entity . . . . . . . . . . . . . . . . 85
11.2. 422 Unprocessable Entity . . . . . . . . . . . . . . . . 87 11.3. 423 Locked . . . . . . . . . . . . . . . . . . . . . . . 85
11.3. 423 Locked . . . . . . . . . . . . . . . . . . . . . . . 87 11.4. 424 Failed Dependency . . . . . . . . . . . . . . . . . 85
11.4. 424 Failed Dependency . . . . . . . . . . . . . . . . . 87 11.5. 507 Insufficient Storage . . . . . . . . . . . . . . . . 85
11.5. 507 Insufficient Storage . . . . . . . . . . . . . . . . 87 12. Use of HTTP Status Codes . . . . . . . . . . . . . . . . . . 86
12. Use of HTTP Status Codes . . . . . . . . . . . . . . . . . . 88 12.1. 412 Precondition Failed . . . . . . . . . . . . . . . . 86
12.1. 412 Precondition Failed . . . . . . . . . . . . . . . . 88 12.2. 414 Request-URI Too Long . . . . . . . . . . . . . . . . 86
12.2. 414 Request-URI Too Long . . . . . . . . . . . . . . . . 88 13. Multi-Status Response . . . . . . . . . . . . . . . . . . . . 87
13. Multi-Status Response . . . . . . . . . . . . . . . . . . . . 89 13.1. Response headers . . . . . . . . . . . . . . . . . . . . 87
13.1. Response headers . . . . . . . . . . . . . . . . . . . . 89 13.2. Handling redirected child resources . . . . . . . . . . 88
13.2. Handling redirected child resources . . . . . . . . . . 89 13.3. Internal Status Codes . . . . . . . . . . . . . . . . . 88
13.3. Internal Status Codes . . . . . . . . . . . . . . . . . 90 14. XML Element Definitions . . . . . . . . . . . . . . . . . . . 89
14. XML Element Definitions . . . . . . . . . . . . . . . . . . . 91 14.1. activelock XML Element . . . . . . . . . . . . . . . . . 89
14.1. activelock XML Element . . . . . . . . . . . . . . . . . 91 14.2. allprop XML Element . . . . . . . . . . . . . . . . . . 89
14.2. allprop XML Element . . . . . . . . . . . . . . . . . . 91 14.3. collection XML Element . . . . . . . . . . . . . . . . . 89
14.3. collection XML Element . . . . . . . . . . . . . . . . . 91 14.4. depth XML Element . . . . . . . . . . . . . . . . . . . 89
14.4. depth XML Element . . . . . . . . . . . . . . . . . . . 92 14.5. error XML Element . . . . . . . . . . . . . . . . . . . 90
14.5. error XML Element . . . . . . . . . . . . . . . . . . . 92 14.6. exclusive XML Element . . . . . . . . . . . . . . . . . 90
14.6. exclusive XML Element . . . . . . . . . . . . . . . . . 92 14.7. href XML Element . . . . . . . . . . . . . . . . . . . . 90
14.7. href XML Element . . . . . . . . . . . . . . . . . . . . 92 14.8. include XML Element . . . . . . . . . . . . . . . . . . 91
14.8. include XML Element . . . . . . . . . . . . . . . . . . 93 14.9. location XML Element . . . . . . . . . . . . . . . . . . 91
14.9. location XML Element . . . . . . . . . . . . . . . . . . 93 14.10. lockentry XML Element . . . . . . . . . . . . . . . . . 91
14.10. lockentry XML Element . . . . . . . . . . . . . . . . . 93 14.11. lockinfo XML Element . . . . . . . . . . . . . . . . . . 92
14.11. lockinfo XML Element . . . . . . . . . . . . . . . . . . 94 14.12. lockroot XML Element . . . . . . . . . . . . . . . . . . 92
14.12. lockroot XML Element . . . . . . . . . . . . . . . . . . 94 14.13. lockscope XML Element . . . . . . . . . . . . . . . . . 92
14.13. lockscope XML Element . . . . . . . . . . . . . . . . . 94 14.14. locktoken XML Element . . . . . . . . . . . . . . . . . 92
14.14. locktoken XML Element . . . . . . . . . . . . . . . . . 94 14.15. locktype XML Element . . . . . . . . . . . . . . . . . . 93
14.15. locktype XML Element . . . . . . . . . . . . . . . . . . 95 14.16. multistatus XML Element . . . . . . . . . . . . . . . . 93
14.16. multistatus XML Element . . . . . . . . . . . . . . . . 95 14.17. owner XML Element . . . . . . . . . . . . . . . . . . . 93
14.17. owner XML Element . . . . . . . . . . . . . . . . . . . 95 14.18. prop XML element . . . . . . . . . . . . . . . . . . . . 94
14.18. prop XML element . . . . . . . . . . . . . . . . . . . . 96 14.19. propertyupdate XML element . . . . . . . . . . . . . . . 94
14.19. propertyupdate XML element . . . . . . . . . . . . . . . 96 14.20. propfind XML Element . . . . . . . . . . . . . . . . . . 94
14.20. propfind XML Element . . . . . . . . . . . . . . . . . . 96 14.21. propname XML Element . . . . . . . . . . . . . . . . . . 94
14.21. propname XML Element . . . . . . . . . . . . . . . . . . 97 14.22. propstat XML Element . . . . . . . . . . . . . . . . . . 95
14.22. propstat XML Element . . . . . . . . . . . . . . . . . . 97 14.23. remove XML element . . . . . . . . . . . . . . . . . . . 95
14.23. remove XML element . . . . . . . . . . . . . . . . . . . 97 14.24. response XML Element . . . . . . . . . . . . . . . . . . 95
14.24. response XML Element . . . . . . . . . . . . . . . . . . 97 14.25. responsedescription XML Element . . . . . . . . . . . . 96
14.25. responsedescription XML Element . . . . . . . . . . . . 98 14.26. set XML element . . . . . . . . . . . . . . . . . . . . 96
14.26. set XML element . . . . . . . . . . . . . . . . . . . . 98 14.27. shared XML Element . . . . . . . . . . . . . . . . . . . 96
14.27. shared XML Element . . . . . . . . . . . . . . . . . . . 99 14.28. status XML Element . . . . . . . . . . . . . . . . . . . 97
14.28. status XML Element . . . . . . . . . . . . . . . . . . . 99 14.29. timeout XML Element . . . . . . . . . . . . . . . . . . 97
14.29. timeout XML Element . . . . . . . . . . . . . . . . . . 99 14.30. write XML Element . . . . . . . . . . . . . . . . . . . 97
14.30. write XML Element . . . . . . . . . . . . . . . . . . . 99 15. DAV Properties . . . . . . . . . . . . . . . . . . . . . . . 98
15. DAV Properties . . . . . . . . . . . . . . . . . . . . . . . 100 15.1. creationdate Property . . . . . . . . . . . . . . . . . 98
15.1. creationdate Property . . . . . . . . . . . . . . . . . 100 15.2. displayname Property . . . . . . . . . . . . . . . . . . 99
15.2. displayname Property . . . . . . . . . . . . . . . . . . 101 15.3. getcontentlanguage Property . . . . . . . . . . . . . . 99
15.3. getcontentlanguage Property . . . . . . . . . . . . . . 101 15.4. getcontentlength Property . . . . . . . . . . . . . . . 100
15.4. getcontentlength Property . . . . . . . . . . . . . . . 102 15.5. getcontenttype Property . . . . . . . . . . . . . . . . 100
15.5. getcontenttype Property . . . . . . . . . . . . . . . . 102 15.6. getetag Property . . . . . . . . . . . . . . . . . . . . 101
15.6. getetag Property . . . . . . . . . . . . . . . . . . . . 103 15.7. getlastmodified Property . . . . . . . . . . . . . . . . 101
15.7. getlastmodified Property . . . . . . . . . . . . . . . . 103 15.8. lockdiscovery Property . . . . . . . . . . . . . . . . . 102
15.8. lockdiscovery Property . . . . . . . . . . . . . . . . . 104 15.8.1. Example - Retrieving DAV:lockdiscovery . . . . . . . 103
15.8.1. Example - Retrieving DAV:lockdiscovery . . . . . . . 105 15.9. resourcetype Property . . . . . . . . . . . . . . . . . 104
15.9. resourcetype Property . . . . . . . . . . . . . . . . . 106 15.10. supportedlock Property . . . . . . . . . . . . . . . . . 105
15.10. supportedlock Property . . . . . . . . . . . . . . . . . 107 15.10.1. Example - Retrieving DAV:supportedlock . . . . . . . 106
15.10.1. Example - Retrieving DAV:supportedlock . . . . . . . 108 16. Precondition/postcondition XML elements . . . . . . . . . . . 107
16. Precondition/postcondition XML elements . . . . . . . . . . . 109 17. XML Extensibility in DAV . . . . . . . . . . . . . . . . . . 111
17. XML Extensibility in DAV . . . . . . . . . . . . . . . . . . 113 18. DAV Compliance Classes . . . . . . . . . . . . . . . . . . . 113
18. DAV Compliance Classes . . . . . . . . . . . . . . . . . . . 115 18.1. Class 1 . . . . . . . . . . . . . . . . . . . . . . . . 113
18.1. Class 1 . . . . . . . . . . . . . . . . . . . . . . . . 115 18.2. Class 2 . . . . . . . . . . . . . . . . . . . . . . . . 113
18.2. Class 2 . . . . . . . . . . . . . . . . . . . . . . . . 115 18.3. Class 3 . . . . . . . . . . . . . . . . . . . . . . . . 113
18.3. Class 3 . . . . . . . . . . . . . . . . . . . . . . . . 115 19. Internationalization Considerations . . . . . . . . . . . . . 115
19. Internationalization Considerations . . . . . . . . . . . . . 117 20. Security Considerations . . . . . . . . . . . . . . . . . . . 117
20. Security Considerations . . . . . . . . . . . . . . . . . . . 119 20.1. Authentication of Clients . . . . . . . . . . . . . . . 117
20.1. Authentication of Clients . . . . . . . . . . . . . . . 119 20.2. Denial of Service . . . . . . . . . . . . . . . . . . . 117
20.2. Denial of Service . . . . . . . . . . . . . . . . . . . 119 20.3. Security through Obscurity . . . . . . . . . . . . . . . 118
20.3. Security through Obscurity . . . . . . . . . . . . . . . 120 20.4. Privacy Issues Connected to Locks . . . . . . . . . . . 118
20.4. Privacy Issues Connected to Locks . . . . . . . . . . . 120 20.5. Privacy Issues Connected to Properties . . . . . . . . . 118
20.5. Privacy Issues Connected to Properties . . . . . . . . . 120 20.6. Implications of XML Entities . . . . . . . . . . . . . . 119
20.6. Implications of XML Entities . . . . . . . . . . . . . . 121 20.7. Risks Connected with Lock Tokens . . . . . . . . . . . . 120
20.7. Risks Connected with Lock Tokens . . . . . . . . . . . . 122 20.8. Hosting Malicious Content . . . . . . . . . . . . . . . 120
20.8. Hosting Malicious Content . . . . . . . . . . . . . . . 122 21. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 121
21. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 123 21.1. New URI Schemes . . . . . . . . . . . . . . . . . . . . 121
21.1. New URI Schemes . . . . . . . . . . . . . . . . . . . . 123 21.2. XML Namespaces . . . . . . . . . . . . . . . . . . . . . 121
21.2. XML Namespaces . . . . . . . . . . . . . . . . . . . . . 123 21.3. Message Header Fields . . . . . . . . . . . . . . . . . 121
21.3. Message Header Fields . . . . . . . . . . . . . . . . . 123 21.3.1. DAV . . . . . . . . . . . . . . . . . . . . . . . . 121
21.3.1. DAV . . . . . . . . . . . . . . . . . . . . . . . . 123 21.3.2. Depth . . . . . . . . . . . . . . . . . . . . . . . 121
21.3.2. Depth . . . . . . . . . . . . . . . . . . . . . . . 123 21.3.3. Destination . . . . . . . . . . . . . . . . . . . . 122
21.3.3. Destination . . . . . . . . . . . . . . . . . . . . 124 21.3.4. If . . . . . . . . . . . . . . . . . . . . . . . . . 122
21.3.4. If . . . . . . . . . . . . . . . . . . . . . . . . . 124 21.3.5. Lock-Token . . . . . . . . . . . . . . . . . . . . . 122
21.3.5. Lock-Token . . . . . . . . . . . . . . . . . . . . . 124 21.3.6. Overwrite . . . . . . . . . . . . . . . . . . . . . 122
21.3.6. Overwrite . . . . . . . . . . . . . . . . . . . . . 124 21.3.7. Timeout . . . . . . . . . . . . . . . . . . . . . . 123
21.3.7. Timeout . . . . . . . . . . . . . . . . . . . . . . 125 22. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 124
22. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 126 23. Contributors to This Specification . . . . . . . . . . . . . 126
23. Contributors to This Specification . . . . . . . . . . . . . 128 24. Authors of RFC2518 . . . . . . . . . . . . . . . . . . . . . 127
24. Authors of RFC2518 . . . . . . . . . . . . . . . . . . . . . 129 25. References . . . . . . . . . . . . . . . . . . . . . . . . . 128
25. References . . . . . . . . . . . . . . . . . . . . . . . . . 130 25.1. Normative References . . . . . . . . . . . . . . . . . . 128
25.1. Normative References . . . . . . . . . . . . . . . . . . 130 25.2. Informational References . . . . . . . . . . . . . . . . 129
25.2. Informational References . . . . . . . . . . . . . . . . 131 Appendix A. Notes on Processing XML Elements . . . . . . . . . . 130
Appendix A. Notes on Processing XML Elements . . . . . . . . . . 132 A.1. Notes on Empty XML Elements . . . . . . . . . . . . . . 130
A.1. Notes on Empty XML Elements . . . . . . . . . . . . . . 132 A.2. Notes on Illegal XML Processing . . . . . . . . . . . . 130
A.2. Notes on Illegal XML Processing . . . . . . . . . . . . 132 A.3. Example - XML Syntax Error . . . . . . . . . . . . . . . 130
A.3. Example - XML Syntax Error . . . . . . . . . . . . . . . 132 A.4. Example - Unexpected XML Element . . . . . . . . . . . . 131
A.4. Example - Unexpected XML Element . . . . . . . . . . . . 133 Appendix B. Notes on HTTP Client Compatibility . . . . . . . . . 133
Appendix B. Notes on HTTP Client Compatibility . . . . . . . . . 135 Appendix C. The opaquelocktoken scheme and URIs . . . . . . . . 134
Appendix C. The opaquelocktoken scheme and URIs . . . . . . . . 136 Appendix D. Lock-null Resources . . . . . . . . . . . . . . . . 135
Appendix D. Guidance for Clients Desiring to Authenticate . . . 137 Appendix E. Guidance for Clients Desiring to Authenticate . . . 136
Appendix E. Summary of changes from RFC2518 . . . . . . . . . . 139 Appendix F. Summary of changes from RFC2518 . . . . . . . . . . 138
E.1. Changes for both Client and Server Implementations . . . 139 F.1. Changes for both Client and Server Implementations . . . 138
E.2. Changes for Server Implementors . . . . . . . . . . . . 140 F.2. Changes for Server Implementations . . . . . . . . . . . 139
E.3. Other Changes . . . . . . . . . . . . . . . . . . . . . 141 F.3. Other Changes . . . . . . . . . . . . . . . . . . . . . 140
Appendix F. Change Log (to be removed by RFC Editor before Appendix G. Change Log (to be removed by RFC Editor before
publication) . . . . . . . . . . . . . . . . . . . . 142 publication) . . . . . . . . . . . . . . . . . . . . 141
F.1. Changes from -05 to -06 . . . . . . . . . . . . . . . . 142 G.1. Changes from -05 to -06 . . . . . . . . . . . . . . . . 141
F.2. Changes in -07 . . . . . . . . . . . . . . . . . . . . . 142 G.2. Changes in -07 . . . . . . . . . . . . . . . . . . . . . 141
F.3. Changes in -08 . . . . . . . . . . . . . . . . . . . . . 143 G.3. Changes in -08 . . . . . . . . . . . . . . . . . . . . . 142
F.4. Changes in -09 . . . . . . . . . . . . . . . . . . . . . 144 G.4. Changes in -09 . . . . . . . . . . . . . . . . . . . . . 143
F.5. Changes in -10 . . . . . . . . . . . . . . . . . . . . . 145 G.5. Changes in -10 . . . . . . . . . . . . . . . . . . . . . 144
F.6. Changes in -11 . . . . . . . . . . . . . . . . . . . . . 145 G.6. Changes in -11 . . . . . . . . . . . . . . . . . . . . . 144
F.7. Changes in -12 . . . . . . . . . . . . . . . . . . . . . 145 G.7. Changes in -12 . . . . . . . . . . . . . . . . . . . . . 144
F.8. Changes in -13 . . . . . . . . . . . . . . . . . . . . . 146 G.8. Changes in -13 . . . . . . . . . . . . . . . . . . . . . 145
F.9. Changes in -14 . . . . . . . . . . . . . . . . . . . . . 146 G.9. Changes in -14 . . . . . . . . . . . . . . . . . . . . . 145
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 147 G.10. Changes in -15 . . . . . . . . . . . . . . . . . . . . . 145
Intellectual Property and Copyright Statements . . . . . . . . . 148 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 146
Intellectual Property and Copyright Statements . . . . . . . . . 147
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.
the ability to link pages of any media type to related pages.
Collections: The ability to create sets of documents and to retrieve Collections: The ability to create sets of documents and to retrieve
a hierarchical membership listing (like a directory listing in a file a hierarchical membership listing (like a directory listing in a file
system). system).
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, operations which change the URL. move Web resources, operations which change the mapping from URLs to
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]. Versioning Protocol for the World Wide Web" [RFC2291].
This standard does not specify the versioning operations suggested by This document does not specify the versioning operations suggested by
[RFC2291]. That work was done in a separate document, "Versioning [RFC2291]. That work was done in a separate document, "Versioning
Extensions to WebDAV" [RFC3253]. Extensions to WebDAV" [RFC3253].
The sections below provide a detailed introduction to various WebDAV The sections below provide a detailed introduction to various WebDAV
abstractions: resource properties (Section 4), collections of abstractions: resource properties (Section 4), collections of
resources (Section 5), locks (Section 6) in general and write locks resources (Section 5), locks (Section 6) in general and write locks
(Section 7) specifically. (Section 7) specifically.
These abstractions are manipulated by the WebDAV-specific HTTP These abstractions are manipulated by the WebDAV-specific HTTP
methods (Section 9) and the new HTTP headers (Section 10) used with methods (Section 9) and the new HTTP headers (Section 10) used with
WebDAV methods. WebDAV methods. General considerations for handling HTTP requests
and responses in WebDAV are found in Section 8.
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 11) and describes existing HTTP status codes methods (Section 11) and describes existing HTTP status codes
(Section 12) as used in WebDAV. Since some WebDAV methods may (Section 12) as used in WebDAV. Since some WebDAV methods may
operate over many resources, the Multi-Status response (Section 13) operate over many resources, the Multi-Status response (Section 13)
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 precondition resources. Finally, this version of WebDAV introduces precondition
skipping to change at page 10, line 9 skipping to change at page 10, line 9
Finishing off the specification are sections on what it means for a Finishing off the specification are sections on what it means for a
resource to be compliant with this specification (Section 18), on resource to be compliant with this specification (Section 18), on
internationalization support (Section 19), and on security internationalization support (Section 19), and on security
(Section 20). (Section 20).
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], is exactly the same as described in Section 2.1 of [RFC2616],
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], these rules apply to this document as well. of [RFC2616], 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]. document are to be interpreted as described in [RFC2119].
Note that in natural language, a property like the "creationdate" Note that in natural language, a property like the "creationdate"
property in the "DAV:" XML namespace is sometimes referred to as property in the "DAV:" XML namespace is sometimes referred to as
"DAV:creationdate" for brevity. "DAV:creationdate" for brevity.
skipping to change at page 11, line 24 skipping to change at page 11, line 24
to have zero, one, or many URI mappings. Mapping a resource to an to have zero, one, or many URI mappings. Mapping a resource to an
"http" scheme URI makes it possible to submit HTTP protocol requests "http" scheme URI makes it possible to submit HTTP protocol requests
to the resource using the URI. to the resource using the URI.
Path Segment - Informally, the characters found between slashes ("/") Path Segment - Informally, the characters found between slashes ("/")
in a URI. Formally, as defined in Section 3.3 of [RFC3986]. in a URI. Formally, as defined in Section 3.3 of [RFC3986].
Collection - Informally, a resource that also acts as a container of Collection - Informally, a resource that also acts as a container of
references to child resources. Formally, a resource that contains a references to child resources. Formally, a resource that contains a
set of mappings between path segments and resources and meets the set of mappings between path segments and resources and meets the
requirements in Section 5. requirements defined in Section 5.
Internal Member (of a Collection) - Informally, a child resource of a Internal Member (of a Collection) - Informally, a child resource of a
collection. Formally, a resource referenced by a path segment collection. Formally, a resource referenced by a path segment
contained in the collection. mapping contained in the collection.
Internal Member URL (of a Collection) - A URL of an internal member, Internal Member URL (of a Collection) - A URL of an internal member,
consisting of the URL of the collection (including trailing slash) consisting of the URL of the collection (including trailing slash)
plus the path segment identifying the internal member. plus the path segment identifying the internal member.
Member (of a Collection) - Informally, a "descendant" of a Member (of a Collection) - Informally, a "descendant" of a
collection. Formally, an internal member of the collection, or, collection. Formally, an internal member of the collection, or,
recursively, a member of an internal member. recursively, a member of an internal member.
Member URL (of a Collection) - A URL that is either an internal Member URL (of a Collection) - A URL that is either an internal
skipping to change at page 13, line 24 skipping to change at page 13, line 24
'subject' property might allow for the indexing of all resources by 'subject' property might allow for the indexing of all resources by
their subject, and an 'author' property might allow for the discovery their subject, and an 'author' property might allow for the discovery
of what authors have written which documents. of what authors have written which documents.
The DAV property model consists of name/value pairs. The name of a The DAV property model consists of name/value pairs. The name of a
property identifies the property's syntax and semantics, and provides property identifies the property's syntax and semantics, and provides
an address by which to refer to its syntax and semantics. an address by which to refer to its syntax and semantics.
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
only, maintained by the server, and b) the value of the property is protected, maintained by the server, and b) the value of the property
maintained by the client, but the server performs syntax checking on is maintained by the client, but the server performs syntax checking
submitted values. All instances of a given live property MUST comply on submitted values. All instances of a given live property MUST
with the definition associated with that property name. A dead comply with the definition associated with that property name. A
property has its syntax and semantics enforced by the client; the dead property has its syntax and semantics enforced by the client;
server merely records the value of the property verbatim. the server merely records the value of the property verbatim.
4.2. Properties and HTTP Headers 4.2. 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.
skipping to change at page 14, line 11 skipping to change at page 14, line 11
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 MUST ignore elements they do not in the original schema and MUST ignore elements they do not
understand. understand.
XML's support for multiple character sets allows any human-readable XML's support for multiple character sets allows any human-readable
property to be encoded and read in a character set familiar to the property to be encoded and read in a character set familiar to the
user. XML's support for multiple human languages, using the "xml: user. XML's support for multiple human languages, using the "xml:
lang" attribute, handles cases where the same character set is lang" attribute, handles cases where the same character set is
employed by multiple human languages. Note that xml:lang scope is employed by multiple human languages. Note that xml:lang scope is
recursive, so a xml:lang attribute on any element containing a recursive, so an xml:lang attribute on any element containing a
property name element applies to the property value unless it has property name element applies to the property value unless it has
been overridden by a more locally scoped attribute. Note that a been overridden by a more locally scoped attribute. Note that a
property only has one value, in one language (or language MAY be left property only has one value, in one language (or language MAY be left
undefined), not multiple values in different languages or a single undefined), not multiple values in different languages or a single
value in multiple languages. value in multiple languages.
A property is always represented with an XML element consisting of A property is always represented with an XML element consisting of
the property name, called the "property name element". The simplest the property name, called the "property name element". The simplest
example is an empty property, which is different from a property that example is an empty property, which is different from a property that
does not exist: does not exist:
skipping to change at page 18, line 23 skipping to change at page 18, line 23
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 URL.
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. The top-level consideration, is exempt from the previous rule. The top-level
collection of the namespace under consideration is not necessarily collection of the namespace under consideration is not necessarily
the collection identified by the absolute path '/', it may be the collection identified by the absolute path '/', it may be
identified by one or more path segments (e.g. /servlets/webdav/...) 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 -- a WebDAV-compatible resource may not have namespace be consistent -- a WebDAV-compatible resource may not have
a parent collection. However, certain WebDAV methods are prohibited a parent collection. However, certain WebDAV methods are prohibited
from producing results that cause namespace inconsistencies. from producing results that cause namespace inconsistencies.
Although implicit in [RFC2616] and [RFC3986], any resource, including As is implicit in [RFC2616] and [RFC3986], any resource, including
collection resources, MAY be identified by more than one URI. For collection resources, MAY be identified by more than one URI. For
example, a resource could be identified by multiple HTTP URLs. example, a resource could be identified by multiple HTTP URLs.
5.2. Collection Resources 5.2. Collection Resources
Collection resources differ from other resources in that they also Collection resources differ from other resources in that they also
act as containers. A collection is a resource whose state consists act as containers. A collection is a resource whose state consists
of at least a set of mappings between path segments and resources, of at least a set of mappings between path segments and resources,
and a set of properties on the collection itself. A collection MAY and a set of properties on the collection itself. In this document,
have additional state such as entity bodies returned by GET. a resource B will be said to be contained in the collection resource
A if there is a path segment mapping which maps to B and which is
contained in A. A collection MUST contain at most one mapping for a
given path segment, i.e., it is illegal to have the same path segment
mapped to more than one resource.
A collection MUST contain at most one mapping for a given path Properties defined on collections behave exactly as do properties on
segment, i.e., it is illegal to have the same path segment mapped to non-collection resources. A collection MAY have additional state
more than one resource. Properties defined on collections behave such as entity bodies returned by GET.
exactly as do properties on non-collection resources.
For all WebDAV compliant resources A and B, identified by URLs "U" For all WebDAV compliant resources A and B, identified by URLs "U"
and "V" respectively, such that "V" is equal to "U/SEGMENT", A MUST and "V" respectively, such that "V" is equal to "U/SEGMENT", A MUST
be a collection that contains a mapping from "SEGMENT" to B. So, if be a collection that contains a mapping from "SEGMENT" to B. So, if
resource B with URL "http://example.com/bar/blah" is WebDAV compliant resource B with URL "http://example.com/bar/blah" is WebDAV compliant
and if resource A with URL "http://example.com/bar/" is WebDAV and if resource A with URL "http://example.com/bar/" is WebDAV
compliant, then resource A must be a collection and must contain at compliant, then resource A must be a collection and must contain
least one mapping from "blah" to B. exactly one mapping from "blah" to B.
Although commonly a mapping consists of a single segment and a
resource, in general, a mapping consists of a set of segments and a
resource. This allows a server to treat a set of segments as
equivalent (i.e. either all of the segments are mapped to the same
resource, or none of the segments are mapped to a resource). For
example, a server that performs case-folding on segments will treat
the segments "ab", "Ab", "aB", and "AB" as equivalent. A client can
then use any of these segments to identify the resource. Note that a
PROPFIND result will select one of these equivalent segments to
identify the mapping, so there will be one PROPFIND response element
per mapping, not one per segment in the mapping.
Collection resources MAY have mappings to non-WebDAV compliant Collection resources MAY have mappings to non-WebDAV compliant
resources in the HTTP URL namespace hierarchy but are not required to resources in the HTTP URL namespace hierarchy but are not required to
do so. For example, if resource X with URL do so. For example, if resource X with URL
"http://example.com/bar/blah" is not WebDAV compliant and resource A "http://example.com/bar/blah" is not WebDAV compliant and resource A
with "URL http://example.com/bar/" identifies a WebDAV collection, with "URL http://example.com/bar/" identifies a WebDAV collection,
then A may or may not have a mapping from "blah" to X. then A may or may not have a mapping from "blah" to X.
If a WebDAV compliant resource has no WebDAV compliant children in If a WebDAV compliant resource has no WebDAV compliant internal
the HTTP URL namespace hierarchy then the WebDAV compliant resource members in the HTTP URL namespace hierarchy then the WebDAV compliant
is not required to be a collection. resource 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.com/blah (no trailing slash), the server may method on http://example.com/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.com/blah/. Wherever a server produces a URL the value http://example.com/blah/. Wherever a server produces a URL
skipping to change at page 20, line 12 skipping to change at page 20, line 27
"/col/link" would indeed be mapped. Similarly, a dynamically- "/col/link" would indeed be mapped. Similarly, a dynamically-
generated page might have a URL mapping from "/col/index.html", thus generated page might have a URL mapping from "/col/index.html", thus
this resource might respond with a 200 OK to a GET request yet not this resource might respond with a 200 OK to a GET request yet not
appear as a member of "/col/". appear as a member of "/col/".
Some mappings to even WebDAV-compliant resources might not appear in Some mappings to even WebDAV-compliant resources might not appear in
the parent collection. An example for this case are servers that the parent collection. An example for this case are servers that
support multiple alias URLs for each WebDAV compliant resource. A support multiple alias URLs for each WebDAV compliant resource. A
server may implement case-insensitive URLs, thus "/col/a" and server may implement case-insensitive URLs, thus "/col/a" and
"/col/A" identify the same resource, yet only either "a" or "A" are "/col/A" identify the same resource, yet only either "a" or "A" are
reported upon listing the members of "/col". reported upon listing the members of "/col". In cases where a server
treats a set of segments as equivalent, the server MUST expose only
one preferred segment per mapping, consistently chosen, in PROPFIND
responses.
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
skipping to change at page 21, line 25 skipping to change at page 21, line 25
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. Lock Model 6.1. Lock Model
This section provides a concise model for how locking behaves. Later This section provides a concise model for how locking behaves. Later
sections will provide more detail on some of the concepts and refer sections will provide more detail on some of the concepts and refer
back to these model statements. Normative statements related to LOCK back to these model statements. Normative statements related to LOCK
and UNLOCK handling can be found in the sections on those methods, and UNLOCK method handling can be found in the sections on those
whereas normative statements that cover any method are gathered here. methods, whereas normative statements that cover any method are
gathered here.
1. A lock either directly or indirectly locks a resource. 1. A lock either directly or indirectly locks a resource.
2. A resource becomes directly locked when a LOCK request to the URL 2. A resource becomes directly locked when a LOCK request to a URL
of that resource creates a new lock. The "lock-root" of the new of that resource creates a new lock. The "lock-root" of the new
lock is that URL. If at the time of the request, the URL is not lock is that URL. If at the time of the request, the URL is not
mapped to a resource, a new empty resource is created and mapped to a resource, a new empty resource is created and
directly locked. directly locked.
3. An exclusive lock (Section 6.2) conflicts with any other kind of 3. An exclusive lock (Section 6.2) conflicts with any other kind of
lock on the same resource, whether either lock is direct or lock on the same resource, whether either lock is direct or
indirect. A server MUST NOT create conflicting locks on a indirect. A server MUST NOT create conflicting locks on a
resource. resource.
4. For a collection that is locked with an infinite depth lock L, 4. For a collection that is locked with an infinite depth lock L,
all member resources are indirectly locked. Changes in all member resources are indirectly locked. Changes in
membership of a such a collection affect the set of indirectly membership of a such a collection affect the set of indirectly
locked resources: locked resources:
* If an internal member resource is added to the collection, and * If a member resource is added to the collection, the new
if the new member resource does not already have a conflicting member resource MUST NOT already have a conflicting lock,
lock, then the resource MUST become indirectly locked by L. because the new resource MUST become indirectly locked by L.
* If an internal member resource stops being a member of the * If a member resource stops being a member of the collection,
collection, then the resource MUST no longer be indirectly then the resource MUST no longer be indirectly locked by L.
locked by L.
5. Each lock is identified by a single unique lock token 5. Each lock is identified by a single unique lock token
(Section 6.5). (Section 6.5).
6. An UNLOCK request deletes the lock with the specified lock token. 6. An UNLOCK request deletes the lock with the specified lock token.
After a lock is deleted, no resource is locked by that lock. After a lock is deleted, no resource is locked by that lock.
7. A lock token is "submitted" in a request when it appears in an If 7. A lock token is "submitted" in a request when it appears in an If
header (the Write Lock (Section 7) section discusses when token header (the Write Lock (Section 7) section discusses when token
submission is required for write locks). submission is required for write locks).
skipping to change at page 23, line 45 skipping to change at page 23, line 45
by various storage repositories. These repositories require control by various storage repositories. These repositories require control
over what sort of locking will be made available. For example, some over what sort of locking will be made available. For example, some
repositories only support shared write locks while others only repositories only support shared write locks while others only
provide support for exclusive write locks while yet others use no provide support for exclusive write locks while yet others use no
locking at all. As each system is sufficiently different to merit locking at all. As each system is sufficiently different to merit
exclusion of certain locking features, this specification leaves exclusion of certain locking features, this specification leaves
locking as the sole axis of negotiation within WebDAV. locking as the sole axis of negotiation within WebDAV.
6.4. Lock Creator and Privileges 6.4. Lock Creator and Privileges
The creator of a lock has special privileges to use the locked The creator of a lock has special privileges to use the lock to
resource. When a locked resource is modified, a server MUST check modify the resource. When a locked resource is modified, a server
that the authenticated principal matches the lock creator (in MUST check that the authenticated principal matches the lock creator
addition to checking for valid lock token submission). For multi- (in addition to checking for valid lock token submission).
user shared lock cases, each authenticated principal MUST obtain its
own shared lock.
The server MAY allow privileged users other than the lock creator to The server MAY allow privileged users other than the lock creator to
destroy a lock (for example, the resource owner or an administrator). destroy a lock (for example, the resource owner or an administrator).
The 'unlock' privilege in [RFC3744] was defined to provide that The 'unlock' privilege in [RFC3744] was defined to provide that
permission. permission.
There is no requirement for servers to accept LOCK requests from all There is no requirement for servers to accept LOCK requests from all
users or from anonymous users. users or from anonymous users.
Note that having a lock does not confer full privilege to modify the Note that having a lock does not confer full privilege to modify the
locked resource. Write access and other privileges MUST be enforced locked resource. Write access and other privileges MUST be enforced
through normal privilege or authentication mechanisms, not based on through normal privilege or authentication mechanisms, not based on
the possible obscurity of lock token values. the possible obscurity of lock token values.
skipping to change at page 24, line 41 skipping to change at page 24, line 39
When a LOCK operation creates a new lock, the new lock token is When a LOCK operation creates a new lock, the new lock token is
returned in the Lock-Token response header defined in Section 10.5, returned in the Lock-Token response header defined in Section 10.5,
and also in the body of the response. and also in the body of the response.
Servers MAY make lock tokens publicly readable (e.g. in the DAV: Servers MAY make lock tokens publicly readable (e.g. in the DAV:
lockdiscovery property). One use case for making lock tokens lockdiscovery property). One use case for making lock tokens
readable is so that a long-lived lock can be removed by the resource readable is so that a long-lived lock can be removed by the resource
owner (the client that obtained the lock might have crashed or owner (the client that obtained the lock might have crashed or
disconnected before cleaning up the lock). Except for the case of disconnected before cleaning up the lock). Except for the case of
using UNLOCK under user guidance, a client SHOULD NOT use a lock using UNLOCK under user guidance, a client SHOULD NOT use a lock
tokens created by another client instance. token created by another client instance.
This specification encourages servers to create UUIDs for lock This specification encourages servers to create UUIDs for lock
tokens, and to use the URI form defined by "A Universally Unique tokens, and to use the URI form defined by "A Universally Unique
Identifier (UUID) URN Namespace" ([RFC4122]). However servers are Identifier (UUID) URN Namespace" ([RFC4122]). However servers are
free to use any URI (e.g. from another scheme) so long as it meets free to use any URI (e.g. from another scheme) so long as it meets
the uniqueness requirements. For example, a valid lock token might the uniqueness requirements. For example, a valid lock token might
be constructed using the "opaquelocktoken" scheme defined in be constructed using the "opaquelocktoken" scheme defined in
Appendix C. Appendix C.
Example: "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6" Example: "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"
skipping to change at page 25, line 35 skipping to change at page 25, line 35
client intends to perform. For example, an applet running in a client intends to perform. For example, an applet running in a
browser may need to lock a resource, but because of the instability browser may need to lock a resource, but because of the instability
of the environment within which the applet is running, the applet may of the environment within which the applet is running, the applet may
be turned off without warning. As a result, the applet is likely to be turned off without warning. As a result, the applet is likely to
ask for a relatively small timeout value so that if the applet dies, ask for a relatively small timeout value so that if the applet dies,
the lock can be quickly harvested. However, a document management the lock can be quickly harvested. However, a document management
system is likely to ask for an extremely long timeout because its system is likely to ask for an extremely long timeout because its
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 immediately been cleaned up. the lock has immediately been removed.
Likewise, a client MUST NOT assume that just because the time-out has Likewise, a client MUST NOT assume that just because the time-out has
not expired, the lock still exists. Clients MUST assume that locks not expired, the lock still exists. Clients MUST assume that locks
can arbitrarily disappear at any time, regardless of the value given can arbitrarily disappear at any time, regardless of the value given
in the Timeout header. The Timeout header only indicates the in the Timeout header. The Timeout header only indicates the
behavior of the server if extraordinary circumstances do not occur. behavior of the server if extraordinary circumstances do not occur.
For example, a sufficiently privileged user may remove a lock at any For example, a sufficiently privileged user may remove a lock at any
time or the system may crash in such a way that it loses the record time or the system may crash in such a way that it loses the record
of the lock's existence. of the lock's existence.
skipping to change at page 26, line 20 skipping to change at page 27, line 5
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 DAV:lockdiscovery who the first principal is. For this purpose the DAV:lockdiscovery
property is provided. This property lists all outstanding locks, property is provided. This property lists all outstanding locks,
describes their type, and MAY even provide the lock tokens. describes their type, and MAY even provide the lock tokens.
Any DAV compliant resource that supports the LOCK method MUST support Any DAV compliant resource that supports the LOCK method MUST support
the DAV:lockdiscovery property. the DAV:lockdiscovery property.
6.9. Locks and Multiple Bindings
A resource may be made available through more than one URI. A lock
MUST cover the resource as well as the URI to which the LOCK request
was addressed. The lock MAY cover other URIs mapped to the same
resource as well.
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.
An exclusive write lock will prevent parallel changes to a resource An exclusive write lock protects a resource: it prevents changes by
by any principal other than the lock creator and in any case where any principal other than the lock creator and in any case where the
the lock token is not submitted (e.g. by a client process other than lock token is not submitted (e.g. by a client process other than the
the one holding the lock). one holding the lock).
Clients MUST submit a lock-token they are authorized to use in any Clients MUST submit a lock-token they are authorized to use in any
request which modifies a write-locked resource. The list of request which modifies a write-locked resource. The list of
modifications covered by a write-lock include: modifications covered by a write-lock include:
1. A change to any of the following aspects of any write-locked 1. A change to any of the following aspects of any write-locked
resource: resource:
* any variant, * any variant,
skipping to change at page 28, line 5 skipping to change at page 28, line 5
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. Write Locks and Properties 7.1. 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 as lockable are
guaranteed not to change while write locked. guaranteed not to change while write locked.
7.2. Avoiding Lost Updates 7.2. Avoiding Lost Updates
Although the write locks provide some help in preventing lost Although the write locks provide some help in preventing lost
updates, they cannot guarantee that updates will never be lost. updates, they cannot guarantee that updates will never be lost.
Consider the following scenario: Consider the following scenario:
Two clients A and B are interested in editing the resource Two clients A and B are interested in editing the resource
'index.html'. Client A is an HTTP client rather than a WebDAV 'index.html'. Client A is an HTTP client rather than a WebDAV
skipping to change at page 29, line 7 skipping to change at page 29, line 7
HTTP 1.1 clients can be good citizens, avoiding overwriting other HTTP 1.1 clients can be good citizens, avoiding overwriting other
clients' changes, by using entity tags in If-Match headers with any clients' changes, by using entity tags in If-Match headers with any
requests that would modify resources. requests that would modify resources.
Information managers may attempt to prevent overwrites by Information managers may attempt to prevent overwrites by
implementing client-side procedures requiring locking before implementing client-side procedures requiring locking before
modifying WebDAV resources. modifying WebDAV resources.
7.3. Write Locks and Unmapped URLs 7.3. Write Locks and Unmapped URLs
WebDAV provides the ability to lock an unmapped URL in order to WebDAV provides the ability to send a LOCK request to an unmapped URL
reserve the name for use. This is a simple way to avoid the lost- in order to reserve the name for use. This is a simple way to avoid
update problem on the creation of a new resource (another way is to the lost-update problem on the creation of a new resource (another
use If-None-Match header specified in HTTP 1.1). It has the side way is to use If-None-Match header specified in Section 14.26 of
benefit of locking the new resource immediately for use of the [RFC2616]). It has the side benefit of locking the new resource
creator. immediately for use of the creator.
Note that the lost-update problem is not an issue for collections Note that the lost-update problem is not an issue for collections
because MKCOL can only be used to create a collection, not to because MKCOL can only be used to create a collection, not to
overwrite an existing collection. When trying to lock a collection overwrite an existing collection. When trying to lock a collection
upon creation, clients may attempt to increase the likelihood of upon creation, clients can attempt to increase the likelihood of
getting the lock by pipelining the MKCOL and LOCK requests together getting the lock by pipelining the MKCOL and LOCK requests together
(but because this doesn't convert two separate operations into one (but because this doesn't convert two separate operations into one
atomic operation there's no guarantee this will work). atomic operation there's no guarantee this will work).
A successful lock request to an unmapped URL MUST result in the A successful lock request to an unmapped URL MUST result in the
creation of an locked resource with empty content. Subsequently, a creation of a locked (non-collection) resource with empty content.
successful PUT request (with the correct lock token) provides the Subsequently, a successful PUT request (with the correct lock token)
content for the resource. Note that the LOCK request has no provides the content for the resource. Note that the LOCK request
mechanism for the client to provide Content-Type or Content-Language, has no mechanism for the client to provide Content-Type or Content-
thus the server will use defaults or empty values and rely on the Language, thus the server will use defaults or empty values and rely
subsequent PUT request for correct values. on the subsequent PUT request for correct values.
The original WebDAV model for locking unmapped URLs created "lock-
null resources". This model was over-complicated and some
interoperability and implementation problems were discovered. The
new WebDAV model for locking unmapped URLs creates "locked empty
resources". Servers MUST implement either lock-null resources or
locked empty resources, but servers SHOULD implement locked empty
resources. This section discusses the original model briefly and the
new model more completely, because clients MUST be able to handle
either model.
In the original "lock-null resource" model, which is no longer
recommended for implementation:
o A lock-null resource sometimes appeared as "Not Found". The
server responds with a 404 or 405 to any method except for PUT,
MKCOL, OPTIONS, PROPFIND, LOCK, UNLOCK.
o A lock-null resource does however show up as a member of its
parent collection.
o The server removes the lock-null resource entirely (its URI
becomes unmapped) if its lock goes away before it is converted to
a regular resource. Recall that locks go away not only when they
expire or are unlcoked, but are also removed if a resource is
renamed or moved, or if any parent collection is renamed or moved.
o The server converts the lock-null resource into a regular resource
if a PUT request to the URL is successful.
o The server converts the lock-null resource into a collection if a
MKCOL request to the URL is successful (though interoperability
experience showed that not all servers followed this requirement).
o Property values were defined for DAV:lockdiscovery and DAV:
supportedlock properties but not necessarily for other properties
like DAV:getcontenttype.
In the "locked empty resource" model, which is now the recommended A resource created with a LOCK is empty but otherwise behaves in
implementation, a resource created with a LOCK is empty but otherwise every way as a normal resource. It behaves the same way as a
behaves in every way as a normal resource. It behaves the same way resource created by a PUT request with an empty body (and where a
as a resource created by a PUT request with an empty body (and where Content-Type and Content-Language was not specified), followed by a
a Content-Type and Content-Language was not specified), followed by a
LOCK request to the same resource. Following from this model, a LOCK request to the same resource. Following from this model, a
locked empty resource: locked empty resource:
o Can be read, deleted, moved, copied, and in all ways behave as a o Can be read, deleted, moved, copied, and in all ways behave as a
regular resource, not a lock-null resource. regular non-collection resource.
o Appears as a member of its parent collection. o Appears as a member of its parent collection.
o SHOULD NOT disappear when its lock goes away (clients must o SHOULD NOT disappear when its lock goes away (clients must
therefore be responsible for cleaning up their own mess, as with therefore be responsible for cleaning up their own mess, as with
any other operation or any non-empty resource) any other operation or any non-empty resource)
o MAY NOT have values for properties like DAV:getcontentlanguage o MAY NOT have values for properties like DAV:getcontentlanguage
which haven't been specified yet by the client. which haven't been specified yet by the client.
skipping to change at page 31, line 8 skipping to change at page 30, line 18
o The response MUST indicate that a resource was created, by use of o The response MUST indicate that a resource was created, by use of
the "201 Created" response code (a LOCK request to an existing the "201 Created" response code (a LOCK request to an existing
resource instead will result in 200 OK). The body must still resource instead will result in 200 OK). The body must still
include the DAV:lockdiscovery property, as with a LOCK request to include the DAV:lockdiscovery property, as with a LOCK request to
an existing resource. an existing resource.
The client is expected to update the locked empty resource shortly The client is expected to update the locked empty resource shortly
after locking it, using PUT and possibly PROPPATCH. after locking it, using PUT and possibly PROPPATCH.
Clients can easily interoperate both with servers that support the Alternatively and for backwards compatibility to [RFC2518], servers
old model "lock-null resources" and the recommended model of "locked MAY implement Lock-Null Resources (LNRs) instead (see definition in
empty resources" by only attempting PUT after a LOCK to an unmapped Appendix D). Clients can easily interoperate both with servers that
URL, not MKCOL or GET. support the old model LNRs and the recommended model of "locked empty
resources" by only attempting PUT after a LOCK to an unmapped URL,
not MKCOL or GET, and by not relying on specific properties of LNRs.
7.4. Write Locks and Collections 7.4. Write Locks and Collections
There are two kinds of collection write locks. A "Depth 0" write There are two kinds of collection write locks. A "Depth 0" write
lock on a collection protects the collection metadata plus the lock on a collection protects the collection properties plus the
internal member URLs of that collection, while not protecting the internal member URLs of that one collection, while not protecting the
content or metadata of child resources. A "Depth: infinity" write content or properties of member resources (if the collection itself
lock on a collection provides the same protection on that collection has any entity bodies, those are also protected). A "Depth:
and also protects every descendent resource as if that resource were infinity" write lock on a collection provides the same protection on
itself write locked. that collection and also provides write lock protection on every
member resource.
Expressed otherwise, a write lock protects any request that would Expressed otherwise, a write lock protects any request that would
create a new resource in a write locked collection, any request that create a new resource in a write locked collection, any request that
would remove an internal member URL of a write locked collection, and would remove an internal member URL of a write locked collection, and
any request that would change the binding name of a member URL. any request that would change the segment name of any internal
member.
Thus, a collection write lock protects all the following actions: Thus, a collection write lock protects all the following actions:
o DELETE a collection's direct internal member, o DELETE a collection's direct internal member,
o MOVE a member out of the collection, o MOVE an internal member out of the collection,
o MOVE a member into the collection,
o MOVE to rename a member within a collection, o MOVE an internal member into the collection,
o COPY a member into a collection, and o MOVE to rename an internal member within a collection,
o COPY an internal member into a collection, and
o PUT or MKCOL request which would create a new member. o PUT or MKCOL request which would create a new internal member.
The collection's lock token is required in addition to the lock token The collection's lock token is required in addition to the lock token
on the internal member itself, if it is locked separately. 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 members of the locked collection. With a depth-infinity lock,
lock, the root of the lock is directly locked, and all its the resource identified by the root of the lock is directly locked,
descendants are indirectly locked. and all its members 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 protected by the lock on the target
target collection (the target collection's lock token will collection (the target collection's lock token will thereafter be
thereafter be required to make further changes). 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
containing member URLs identifying resources that are currently containing member URLs identifying resources that are currently
locked in a manner which conflicts with the new lock (see Section 6.1 locked in a manner which conflicts with the new lock (see Section 6.1
point 3), the request MUST fail with a 423 (Locked) status code, and point 3), the request MUST fail with a 423 (Locked) status code, and
the response SHOULD contain the 'no-conflicting-lock' precondition. the response SHOULD contain the 'no-conflicting-lock' precondition.
If a lock request causes the URL of a resource to be added as an If a lock request 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 protected by the lock. For
only mechanism that allows a resource to be added to a write lock. example, if the collection /a/b/ is write locked and the resource /c
Thus, for example, if the collection /a/b/ is write locked and the is moved to /a/b/c then resource /a/b/c will be added to the write
resource /c is moved to /a/b/c then resource /a/b/c will be added to lock.
the write lock.
7.5. Write Locks and the If Request Header 7.5. Write Locks and the If Request Header
If a user agent is not required to have knowledge about a lock when A user agent has to demonstrate knowledge of a lock when requesting
requesting an operation on a locked resource, the following scenario an operation on a locked resource. Otherwise, the following scenario
might occur. Program A, run by User A, takes out a write lock on a might occur. In the scenario, program A, run by User A, takes out a
resource. Program B, also run by User A, has no knowledge of the write lock on a resource. Program B, also run by User A, has no
lock taken out by Program A, yet performs a PUT to the locked knowledge of the lock taken out by program A, yet performs a PUT to
resource. In this scenario, the PUT succeeds because locks are the locked resource. In this scenario, the PUT succeeds because
associated with a principal, not a program, and thus program B, locks are associated with a principal, not a program, and thus
because it is acting with principal A's credential, is allowed to program B, because it is acting with principal A's credential, is
perform the PUT. However, had program B known about the lock, it allowed to perform the PUT. However, had program B known about the
would not have overwritten the resource, preferring instead to lock, it would not have overwritten the resource, preferring instead
present a dialog box describing the conflict to the user. Due to 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
appears in an If header. For example, if a resource is to be moved appears in an If header. For example, if a resource is to be moved
and both the source and destination are locked then two lock tokens and both the source and destination are locked then two lock tokens
must be submitted in the if header, one for the source and the other must be submitted in the If header, one for the source and the other
for the destination. for the destination.
7.5.1. Example - Write Lock and COPY 7.5.1. Example - Write Lock and COPY
>>Request >>Request
COPY /~fielding/index.html HTTP/1.1 COPY /~fielding/index.html HTTP/1.1
Host: www.example.com Host: www.example.com
Destination: http://www.example.com/users/f/fielding/index.html Destination: http://www.example.com/users/f/fielding/index.html
If: <http://www.example.com/users/f/fielding/index.html> If: <http://www.example.com/users/f/fielding/index.html>
skipping to change at page 35, line 20 skipping to change at page 34, line 22
in Section 7.5, an If header must be submitted containing a lock in Section 7.5, an If header must be submitted containing a lock
token for both the source and destination. token for both the source and destination.
7.7. Refreshing Write Locks 7.7. 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 request 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.
Clients may submit Timeout headers of arbitrary value with their lock Clients may submit Timeout headers of arbitrary value with their lock
refresh requests. Servers, as always, may ignore Timeout headers refresh requests. Servers, as always, may ignore Timeout headers
submitted by the client, and a server MAY refresh a lock with a submitted by the client, and a server MAY refresh a lock with a
timeout period that is different than the previous timeout period timeout period that is different than the previous timeout period
used for the lock, provided it advertises the new value in the LOCK used for the lock, provided it advertises the new value in the LOCK
refresh response. refresh response.
skipping to change at page 37, line 28 skipping to change at page 36, line 28
reference, which is resolved against the Request-URI, or a full URI. reference, which is resolved against the Request-URI, or a full URI.
A server MUST ensure that every 'href' value within a Multi-Status A server MUST ensure that every 'href' value within a Multi-Status
response uses the same format. response uses the same format.
WebDAV only uses one form of relative reference in its extensions, WebDAV only uses one form of relative reference in its extensions,
the absolute path. the absolute path.
Simple-ref = absolute-URI | ( path-absolute [ "?" query ] ) Simple-ref = absolute-URI | ( path-absolute [ "?" query ] )
The absolute-URI, path-absolute and query productions are defined in The absolute-URI, path-absolute and query productions are defined in
section 4.3, 3.3 and 3.4 of [RFC3986]. Section 4.3, 3.3 and 3.4 of [RFC3986].
Within Simple-ref productions, senders MUST NOT: Within Simple-ref productions, senders MUST NOT:
o use dot-segments ("." or ".."), or o use dot-segments ("." or ".."), or
o have prefixes that do not match the Request-URI (using the o have prefixes that do not match the Request-URI (using the
comparison rules defined in Section 3.2.3 of [RFC2616]). comparison rules defined in Section 3.2.3 of [RFC2616]).
Identifiers for collections SHOULD end in a '/' character. Identifiers for collections SHOULD end in a '/' character.
skipping to change at page 38, line 25 skipping to change at page 37, line 25
legal URI may still contain characters that need to be escaped within legal URI may still contain characters that need to be escaped within
XML character data, such as the ampersand character. XML character data, such as the ampersand character.
8.4. Required Bodies in Requests 8.4. Required Bodies in Requests
Some of these new methods do not define bodies. Servers MUST examine Some of these new methods do not define bodies. Servers MUST examine
all requests for a body, even when a body was not expected. In cases all requests for a body, even when a body was not expected. In cases
where a request body is present but would be ignored by a server, the where a request body is present but would be ignored by a server, the
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 the client
intended.
8.5. HTTP Headers for use in WebDAV 8.5. HTTP Headers for use in WebDAV
HTTP defines many headers that can be used in WebDAV requests and HTTP defines many headers that can be used in WebDAV requests and
responses. Not all of these are appropriate in all situations and responses. Not all of these are appropriate in all situations and
some interactions may be undefined. Note that HTTP 1.1 requires the some interactions may be undefined. Note that HTTP 1.1 requires the
Date header in all responses if possible (see section 14.18, Date header in all responses if possible (see Section 14.18,
[RFC2616]). [RFC2616]).
The server MUST do authorization checks before checking any HTTP The server MUST do authorization checks before checking any HTTP
conditional header. conditional header.
8.6. ETag 8.6. ETag
HTTP 1.1 recommends the use of ETags rather than modification dates, HTTP 1.1 recommends the use of ETags rather than modification dates,
for cache-control, and there are even stronger reasons to prefer for cache-control, and there are even stronger reasons to prefer
ETags for authoring. Correct use of ETags is even more important in ETags for authoring. Correct use of ETags is even more important in
skipping to change at page 39, line 21 skipping to change at page 38, line 22
might require some agreement or standard outside the scope of this might require some agreement or standard outside the scope of this
specification and HTTP. Note also that weak ETags have certain specification and HTTP. Note also that weak ETags have certain
restrictions in HTTP, e.g. these cannot be used in If-Match headers. restrictions in HTTP, e.g. these cannot be used in If-Match headers.
Note that the meaning of an ETag in a PUT response is not clearly Note that the meaning of an ETag in a PUT response is not clearly
defined either in this document or in RFC2616 (i.e., whether the ETag defined either in this document or in RFC2616 (i.e., whether the ETag
means that the resource is octet-for-octet equivalent to the body of means that the resource is octet-for-octet equivalent to the body of
the PUT request, or whether the server could have made minor changes the PUT request, or whether the server could have made minor changes
in the formatting or content of the document upon storage). This is in the formatting or content of the document upon storage). This is
an HTTP issue, not purely a WebDAV issue, and is being addressed in an HTTP issue, not purely a WebDAV issue, and is being addressed in
[TODO-REF-NEEDED]. [I-D.draft-whitehead-http-etag].
Because clients may be forced to prompt users or throw away changed Because clients may be forced to prompt users or throw away changed
content if the ETag changes, a WebDAV server SHOULD NOT change the content if the ETag changes, a WebDAV server SHOULD NOT change the
ETag (or the Last-Modified time) for a resource that has an unchanged ETag (or the Last-Modified time) for a resource that has an unchanged
body and location. The ETag represents the state of the body or body and location. The ETag represents the state of the body or
contents of the resource. There is no similar way to tell if contents of the resource. There is no similar way to tell if
properties have changed. properties have changed.
8.7. Including error response bodies 8.7. 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]). The error body mechanism is appropriate (Section 1.6 of [RFC3253]). The error body mechanism is appropriate
to use with any error response that may take a body but does not to use with any error response that may take a body but does not
already have a body defined. The mechanism is particularly already have a body defined. The mechanism is particularly
appropriate when a status code can mean many things (for example, 400 appropriate when a status code can mean many things (for example, 400
Bad Request can mean required headers are missing, headers are Bad Request can mean required headers are missing, headers are
incorrectly formatted, or much more). This error body mechanism is incorrectly formatted, or much more). This error body mechanism is
covered in Section 16 covered in Section 16.
8.8. Impact of Namespace Operations on Cache Validators 8.8. Impact of Namespace Operations on Cache Validators
Note that the HTTP response headers "Etag" and "Last-Modified" (see Note that the HTTP response headers "Etag" and "Last-Modified" (see
[RFC2616], Sections 14.19 and 14.29) are defined per URL (not per [RFC2616], Sections 14.19 and 14.29) are defined per URL (not per
resource), and are used by clients for caching. Therefore servers resource), and are used by clients for caching. Therefore servers
must ensure that executing any operation that affects the URL must ensure that executing any operation that affects the URL
namespace (such as COPY, MOVE, DELETE, PUT or MKCOL) does preserve namespace (such as COPY, MOVE, DELETE, PUT or MKCOL) does preserve
their semantics, in particular: their semantics, in particular:
skipping to change at page 42, line 19 skipping to change at page 41, line 19
describes the results of the attempts to retrieve the various describes the results of the attempts to retrieve the various
properties. properties.
If there is an error retrieving a property then a proper error result If there is an error retrieving a property then a proper error result
MUST be included in the response. A request to retrieve the value of MUST be included in the response. A request to retrieve the value of
a property which does not exist is an error and MUST be noted, if the a property which does not exist is an error and MUST be noted, if the
response uses a 'multistatus' XML element, with a 'response' XML response uses a 'multistatus' XML element, with a 'response' XML
element which contains a 404 (Not Found) status value. element which contains a 404 (Not Found) status value.
Consequently, the 'multistatus' XML element for a collection resource Consequently, the 'multistatus' XML element for a collection resource
with member URLs MUST include a 'response' XML element for each MUST include a 'response' XML element for each member URL of the
member URL of the collection, to whatever depth was requested. It collection, to whatever depth was requested. It SHOULD NOT include
SHOULD NOT include any 'response' elements for resources that are not any 'response' elements for resources that are not WebDAV-compliant.
WebDAV-compliant. Each 'response' element MUST contain an 'href' Each 'response' element MUST contain an 'href' element that contains
element that contains the URL of the resource on which the properties the URL of the resource on which the properties in the prop XML
in the prop XML element are defined. Results for a PROPFIND on a element are defined. Results for a PROPFIND on a collection resource
collection resource with internal member URLs are returned as a flat are returned as a flat list whose order of entries is not
list whose order of entries is not significant. Note that a resource significant. Note that a resource may have only one value for a
may have only one value for a property of a given name, so the property of a given name, so the property may only show up once in
property may only show up once in PROPFIND responses. PROPFIND responses.
Properties may be subject to access control. In the case of Properties may be subject to access control. In the case of
'allprop' and 'propname' requests, if a principal does not have the 'allprop' and 'propname' requests, if a principal does not have the
right to know whether a particular property exists then the property right to know whether a particular property exists then the property
MAY be silently excluded from the response. MAY be silently excluded from the response.
Some PROPFIND results MAY be cached, with care as there is no cache Some PROPFIND results MAY be cached, with care as there is no cache
validation mechanism for most properties. This method is both safe validation mechanism for most properties. This method is both safe
and idempotent (see section 9.1 of [RFC2616]). and idempotent (see Section 9.1 of [RFC2616]).
9.1.1. PROPFIND status codes 9.1.1. PROPFIND status codes
This section, as with similar sections for other methods, provides This section, as with similar sections for other methods, provides
some guidance on error codes and preconditions or postconditions some guidance on error codes and preconditions or postconditions
(defined in Section 16) that might be particularly useful with (defined in Section 16) that might be particularly useful with
PROPFIND. PROPFIND.
403 Forbidden - A server MAY reject PROPFIND requests on collections 403 Forbidden - A server MAY reject PROPFIND requests on collections
with depth header of "Infinity", in which case it SHOULD use this with depth header of "Infinity", in which case it SHOULD use this
error with the precondition code 'propfind-finite-depth' inside the error with the precondition code 'propfind-finite-depth' inside the
error body. error body.
9.1.2. Status codes for use with 207 (Multi-Status) 9.1.2. Status Codes for use in 'propstat' Element
The following are examples of response codes one would expect to be In PROPFIND responses, information about individual properties is
used in a 207 (Multi-Status) response for this method. Note, returned inside 'propstat' elements (see Section 14.22), each
however, that unless explicitly prohibited any 2/3/4/5xx series containing an individual 'status' element containing information
response code may be used in a 207 (Multi-Status) response. about the properties appearing in it. The list below summarizes the
most common status codes used inside 'propstat', however clients
should be prepared to handle other 2/3/4/5xx series status codes as
well.
200 OK - A property exists and/or its value is successfully 200 OK - A property exists and/or its value is successfully returned.
returned.
401 Unauthorized - The property cannot be viewed without 401 Unauthorized - The property cannot be viewed without appropriate
appropriate authorization. authorization.
403 Forbidden - The property cannot be viewed regardless of 403 Forbidden - The property cannot be viewed regardless of
authentication. authentication.
404 Not Found - The property does not exist. 404 Not Found - The property does not exist.
9.1.3. Example - Retrieving Named Properties 9.1.3. Example - Retrieving Named Properties
>>Request >>Request
skipping to change at page 45, line 5 skipping to change at page 44, line 5
</D:responsedescription> </D:responsedescription>
</D:multistatus> </D:multistatus>
In this example, PROPFIND is executed on a non-collection resource In this example, PROPFIND is executed on a non-collection resource
http://www.example.com/file. The propfind XML element specifies the http://www.example.com/file. The propfind XML element specifies the
name of four properties whose values are being requested. In this name of four properties whose values are being requested. In this
case only two properties were returned, since the principal issuing case only two properties were returned, since the principal issuing
the request did not have sufficient access rights to see the third the request did not have sufficient access rights to see the third
and fourth properties. and fourth properties.
9.1.4. Example - Retrieving Named and Dead Properties 9.1.4. Example - Using so-called 'allprop'
>>Request >>Request
PROPFIND /mycol/ HTTP/1.1 PROPFIND /mycol/ HTTP/1.1
Host: www.example.com Host: www.example.com
Depth: 1 Depth: 1
Content-type: application/xml; charset="utf-8" Content-Type: application/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:propfind xmlns:D="DAV:"> <D:propfind xmlns:D="DAV:">
<D:prop> <D:allprop/>
<D:include>
<D:creationdate/> <D:creationdate/>
<D:getlastmodified/> <D:getlastmodified/>
</D:prop> </D:include>
<D:dead-props/>
</D:propfind> </D:propfind>
In this example, PROPFIND is executed on a collection resource In this example, PROPFIND is executed on the resource
http://www.example.com/mycol/. The client requests the values of two http://www.example.com/mycol/ and its internal member resources. The
specific live properties plus all dead properties (names and values). client requests the values of all live properties defined in this
The response is not shown. specification, plus all dead properties, plus two more live
properties defined in [RFC3253]. The response is not shown.
9.1.5. Example - Using 'propname' to Retrieve all Property Names 9.1.5. 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: application/xml; charset="utf-8" Content-Type: application/xml; charset="utf-8"
Content-Length: xxxx Content-Length: xxxx
skipping to change at page 50, line 19 skipping to change at page 49, line 19
identified by the Request-URI. identified by the Request-URI.
All DAV compliant resources MUST support the PROPPATCH method and All DAV compliant resources MUST support the PROPPATCH method and
MUST process instructions that are specified using the MUST process instructions that are specified using the
propertyupdate, set, and remove XML elements. Execution of the propertyupdate, set, and remove XML elements. Execution of the
directives in this method is, of course, subject to access control directives in this method is, of course, subject to access control
constraints. DAV compliant resources SHOULD support the setting of constraints. DAV compliant resources SHOULD support the setting of
arbitrary dead properties. arbitrary dead properties.
The request message body of a PROPPATCH method MUST contain the The request message body of a PROPPATCH method MUST contain the
propertyupdate XML element. Clients SHOULD NOT alter the same propertyupdate XML element.
property more than once in a single PROPPATCH request.
Servers MUST process PROPPATCH instructions in document order (an Servers MUST process PROPPATCH instructions in document order (an
exception to the normal rule that ordering is irrelevant). exception to the normal rule that ordering is irrelevant).
Instructions MUST either all be executed or none executed. Thus if Instructions MUST either all be executed or none executed. Thus if
any error occurs during processing all executed instructions MUST be any error occurs during processing all executed instructions MUST be
undone and a proper error result returned. Instruction processing undone and a proper error result returned. Instruction processing
details can be found in the definition of the set and remove details can be found in the definition of the set and remove
instructions in Section 14.23 and Section 14.26. instructions in Section 14.23 and Section 14.26.
This method is idempotent, but not safe (see section 9.1 of This method is idempotent, but not safe (see Section 9.1 of
[RFC2616]). Responses to this method MUST NOT be cached. [RFC2616]). Responses to this method MUST NOT be cached.
9.2.1. Status Codes for use in 207 (Multi-Status) 9.2.1. Status Codes for use in 'propstat' Element
The following are examples of response codes one would expect to be In PROPPATCH responses, information about individual properties is
used in a 207 (Multi-Status) response for this method. Note, returned inside 'propstat' elements (see Section 14.22), each
however, that unless explicitly prohibited any 2/3/4/5xx series containing an individual 'status' element containing information
response code may be used in a 207 (Multi-Status) response. about the properties appearing in it. The list below summarizes the
most common status codes used inside 'propstat', however clients
should be prepared to handle other 2/3/4/5xx series status codes as
well.
200 (OK) - The property set or change succeeded. Note that if this 200 (OK) - The property set or change succeeded. Note that if this
appears for one property, it appears for every property in the appears for one property, it appears for every property in the
response, due to the atomicity of PROPPATCH. response, due to the atomicity of PROPPATCH.
403 (Forbidden) - The client, for reasons the server chooses not to 403 (Forbidden) - The client, for reasons the server chooses not to
specify, cannot alter one of the properties. specify, cannot alter one of the properties.
403 (Forbidden): The client has attempted to set a read-only 403 (Forbidden): The client has attempted to set a protected
property, such as DAV:getetag. If returning this error, the server property, such as DAV:getetag. If returning this error, the server
SHOULD use the precondition code 'cannot-modify-protected-property' SHOULD use the precondition code 'cannot-modify-protected-property'
inside the response body. inside the response body.
409 (Conflict) - The client has provided a value whose semantics are 409 (Conflict) - The client has provided a value whose semantics are
not appropriate for the property. not appropriate for the property.
424 (Failed Dependency) - The property change could not be made 424 (Failed Dependency) - The property change could not be made
because of another property change that failed. because of another property change that failed.
skipping to change at page 52, line 45 skipping to change at page 51, line 45
were not for the conflict with removing the Copyright-Owner property. were not for the conflict with removing the Copyright-Owner property.
9.3. MKCOL Method 9.3. MKCOL Method
The MKCOL method is used to create a new collection. All WebDAV The MKCOL method is used to create a new collection. All WebDAV
compliant resources MUST support the MKCOL method. compliant resources MUST support the MKCOL method.
MKCOL creates a new collection resource at the location specified by MKCOL creates a new collection resource at the location specified by
the Request-URI. If the Request-URI is already mapped to a resource the Request-URI. If the Request-URI is already mapped to a resource
then the MKCOL MUST fail. During MKCOL processing, a server MUST then the MKCOL MUST fail. During MKCOL processing, a server MUST
make the Request-URI a member of its parent collection, unless the make the Request-URI an internal member of its parent collection,
Request-URI is "/". If no such ancestor exists, the method MUST unless the Request-URI is "/". If no such ancestor exists, the
fail. When the MKCOL operation creates a new collection resource, method MUST fail. When the MKCOL operation creates a new collection
all ancestors MUST already exist, or the method MUST fail with a 409 resource, all ancestors MUST already exist, or the method MUST fail
(Conflict) status code. For example, if a request to create with a 409 (Conflict) status code. For example, if a request to
collection /a/b/c/d/ is made, and /a/b/c/ does not exist, the request create collection /a/b/c/d/ is made, and /a/b/c/ does not exist, the
must fail. request 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 precise A MKCOL request message may contain a message body. The precise
behavior of a MKCOL request when the body is present is undefined, behavior of a MKCOL request when the body is present is undefined,
but limited to creating collections, members of a collection, bodies but limited to creating collections, members of a collection, bodies
of members and properties on the collections or members. If the of members and properties on the collections or members. If the
server receives a MKCOL request entity type it does not support or server receives a MKCOL request entity type it does not support or
understand it MUST respond with a 415 (Unsupported Media Type) status understand it MUST respond with a 415 (Unsupported Media Type) status
code. If the server decides to reject the request based on the code. If the server decides to reject the request based on the
presence of an entity or the type of an entity, it should use the 415 presence of an entity or the type of an entity, it should use the 415
(Unsupported Media Type) status code. (Unsupported Media Type) status code.
This method is idempotent, but not safe (see section 9.1 of This method is idempotent, but not safe (see Section 9.1 of
[RFC2616]). Responses to this method MUST NOT be cached. [RFC2616]). Responses to this method MUST NOT be cached.
9.3.1. MKCOL Status Codes 9.3.1. MKCOL Status Codes
In addition to the general status codes possible, the following In addition to the general status codes possible, the following
status codes have specific applicability to MKCOL: status codes have specific applicability to MKCOL:
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)
skipping to change at page 54, line 44 skipping to change at page 53, line 44
9.5. POST for Collections 9.5. 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.
9.6. DELETE Requirements 9.6. DELETE Requirements
DELETE is defined in [RFC2616], section 9.7, to "delete the resource DELETE is defined in [RFC2616], Section 9.7, to "delete the resource
identified by the Request-URI". However, WebDAV changes some DELETE identified by the Request-URI". However, WebDAV changes some DELETE
handling requirements. handling requirements.
A server processing a successful DELETE request: A server processing a successful DELETE request:
MUST destroy locks rooted on the deleted resource MUST destroy locks rooted on the deleted resource
MUST remove the mapping from the Request-URI to any resource. MUST remove the mapping from the Request-URI to any resource.
Thus, after a successful DELETE operation (and in the absence of Thus, after a successful DELETE operation (and in the absence of
skipping to change at page 55, line 33 skipping to change at page 54, line 33
If any resource identified by a member URL cannot be deleted then all If any resource identified by a member URL cannot be deleted then all
of the member's ancestors MUST NOT be deleted, so as to maintain URL of the member's ancestors MUST NOT be deleted, so as to maintain URL
namespace consistency. namespace consistency.
Any headers included with DELETE MUST be applied in processing every Any headers included with DELETE MUST be applied in processing every
resource to be deleted. resource to be deleted.
When the DELETE method has completed processing it MUST result in a When the DELETE method has completed processing it MUST result in a
consistent URL namespace. consistent URL namespace.
If an error occurs deleting an internal resource (a resource other If an error occurs deleting a member resource (a resource other than
than the resource identified in the Request-URI) then the response the resource identified in the Request-URI) then the response can be
can be a 207 (Multi-Status). Multi-Status is used here to indicate a 207 (Multi-Status). Multi-Status is used here to indicate which
which internal resources could NOT be deleted, including an error internal resources could NOT be deleted, including an error code
code which should help the client understand which resources caused which should help the client understand which resources caused the
the failure. For example, the Multi-Status body could include a failure. For example, the Multi-Status body could include a response
response with status 423 (Locked) if an internal resource was locked. with status 423 (Locked) if an internal resource was locked.
The server MAY return a 4xx status response, rather than a 207, if The server MAY return a 4xx status response, rather than a 207, if
the request failed completely. the request failed completely.
424 (Failed Dependency) status codes SHOULD NOT be in the 207 (Multi- 424 (Failed Dependency) status codes SHOULD NOT be in the 207 (Multi-
Status) response for DELETE. They can be safely left out because the Status) response for DELETE. They can be safely left out because the
client will know that the ancestors of a resource could not be client will know that the ancestors of a resource could not be
deleted when the client receives an error for the ancestor's progeny. deleted when the client receives an error for the ancestor's progeny.
Additionally 204 (No Content) errors SHOULD NOT be returned in the Additionally 204 (No Content) errors SHOULD NOT be returned in the
207 (Multi-Status). The reason for this prohibition is that 204 (No 207 (Multi-Status). The reason for this prohibition is that 204 (No
skipping to change at page 57, line 12 skipping to change at page 56, line 12
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).
A PUT request is the only way a client has to indicate to the server A PUT request is the only way a client has to indicate to the server
what Content-Type a resource should have, and whether it should what Content-Type a resource should have, and whether it should
change if the resource is overwritten. Thus, a client SHOULD provide change if the resource is overwritten. Thus, a client SHOULD provide
a Content-Type for a new resource if any is known. If the client a Content-Type for a new resource if any is known. If the client
does not provide a Content-Type for a new resource, the server MAY does not provide a Content-Type for a new resource, the server MAY
create a resource with no Content-Type assigned, or it MAY attempt to create a resource with no Content-Type assigned, or it MAY attempt to
assign a reasonable and legal Content-Type. assign a Content-Type.
Note that although a recipient should treat metadata supplied with an Note that although a recipient should treat metadata supplied with an
HTTP request as authorative, in practice there's no guarantee that a HTTP request as authorative, in practice there's no guarantee that a
server will accept Content- headers. Many servers do not allow server will accept Content- headers. Many servers do not allow
configuring the Content-Type on a per-resource basis in the first configuring the Content-Type on a per-resource basis in the first
place. Thus, clients should not rely on the ability to directly place. Thus, clients should not rely on the ability to directly
influence the content type by including a Content-Type request influence the content type by including a Content-Type request
header. header.
9.7.2. PUT for Collections 9.7.2. PUT for Collections
skipping to change at page 57, line 44 skipping to change at page 56, line 44
in the Destination header. The Destination header MUST be present. in the Destination header. The Destination header MUST be present.
The exact behavior of the COPY method depends on the type of the The exact behavior of the COPY method depends on the type of the
source resource. source resource.
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.
This method is idempotent, but not safe (see section 9.1 of This method is idempotent, but not safe (see Section 9.1 of
[RFC2616]). Responses to this method MUST NOT be cached. [RFC2616]). Responses to this method MUST NOT be cached.
9.8.1. COPY for Non-collection Resources 9.8.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
method is the creation of a new resource at the destination whose method is the creation of a new resource at the destination whose
state and behavior match that of the source resource as closely as state and behavior match that of the source resource as closely as
possible. Since the environment at the destination may be different possible. Since the environment at the destination may be different
than at the source due to factors outside the scope of control of the than at the source due to factors outside the scope of control of the
server, such as the absence of resources required for correct server, such as the absence of resources required for correct
operation, it may not be possible to completely duplicate the operation, it may not be possible to completely duplicate the
behavior of the resource at the destination. Subsequent alterations behavior of the resource at the destination. Subsequent alterations
to the destination resource will not modify the source resource. to the destination resource will not modify the source resource.
Subsequent alterations to the source resource will not modify the Subsequent alterations to the source resource will not modify the
destination resource. destination resource.
9.8.2. COPY for Properties 9.8.2. COPY for Properties
After a successful COPY invocation, all dead properties on the source After a successful COPY invocation, all dead properties on the source
resource MUST be duplicated on the destination resource, along with resource SHOULD be duplicated on the destination resource. Live
all properties as appropriate. Live properties described in this properties described in this document SHOULD be duplicated as
document SHOULD be duplicated as identically behaving live properties identically behaving live properties at the destination resource, but
at the destination resource, but not necessarily with the same not necessarily with the same values. Servers SHOULD NOT convert
values. Servers SHOULD NOT convert live properties into dead live properties into dead properties on the destination resource,
properties on the destination resource, because clients may then draw because clients may then draw incorrect conclusions about the state
incorrect conclusions about the state or functionality of a resource. or functionality of a resource. Note that some live properties are
Note that some live properties are defined such that the absence of defined such that the absence of the property has a specific meaning
the property has a specific meaning (e.g. a flag with one meaning if (e.g. a flag with one meaning if present and the opposite if absent),
present and the opposite if absent), and in these cases, a successful and in these cases, a successful COPY might result in the property
COPY might result in the property being reported as "Not Found" in being reported as "Not Found" in subsequent requests.
subsequent requests.
A COPY operation creates a new resource, much like a PUT operation When the destination is an unmapped URL, a COPY operation creates a
does. Live properties which are related to resource creation (such new resource much like a PUT operation does. Live properties which
as DAV:creationdate) should have their values set accordingly. are related to resource creation (such as DAV:creationdate) should
have their values set accordingly.
9.8.3. COPY for Collections 9.8.3. COPY for Collections
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
skipping to change at page 62, line 37 skipping to change at page 61, line 37
HTTP/1.1 207 Multi-Status HTTP/1.1 207 Multi-Status
Content-Type: application/xml; charset="utf-8" Content-Type: application/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:multistatus xmlns:d="DAV:"> <d:multistatus xmlns:d="DAV:">
<d:response> <d:response>
<d:href>http://www.example.com/othercontainer/R2/</d:href> <d:href>http://www.example.com/othercontainer/R2/</d:href>
<d:status>HTTP/1.1 423 Locked</d:status> <d:status>HTTP/1.1 423 Locked</d:status>
<d:error><d:lock-token-submitted/></d:error>
</d:response> </d:response>
</d:multistatus> </d:multistatus>
The Depth header is unnecessary as the default behavior of COPY on a The Depth header is unnecessary as the default behavior of COPY on a
collection is to act as if a "Depth: infinity" header had been collection is to act as if a "Depth: infinity" header had been
submitted. In this example most of the resources, along with the submitted. In this example most of the resources, along with the
collection, were copied successfully. However the collection R2 collection, were copied successfully. However the collection R2
failed because the destination R2 is locked. Because there was an failed because the destination R2 is locked. Because there was an
error copying R2, none of R2's members were copied. However no error copying R2, none of R2's members were copied. However no
errors were listed for those members due to the error minimization errors were listed for those members due to the error minimization
rules. rules.
9.9. MOVE Method 9.9. MOVE Method
The MOVE operation on a non-collection resource is the logical The MOVE operation on a non-collection resource is the logical
equivalent of a copy (COPY), followed by consistency maintenance equivalent of a copy (COPY), followed by consistency maintenance
processing, followed by a delete of the source, where all three processing, followed by a delete of the source, where all three
actions are performed atomically. The consistency maintenance step actions are performed in a single operation. The consistency
allows the server to perform updates caused by the move, such as maintenance step allows the server to perform updates caused by the
updating all URLs other than the Request-URI which identify the move, such as updating all URLs other than the Request-URI which
source resource, to point to the new destination resource. identify the source resource, to point to the new destination
Consequently, the Destination header MUST be present on all MOVE resource.
methods and MUST follow all COPY requirements for the COPY part of
the MOVE method. All WebDAV compliant resources MUST support the
MOVE method. However, support for the MOVE method does not guarantee
the ability to move a resource to a particular destination.
For example, separate programs may actually control different sets of The Destination header MUST be present on all MOVE methods and MUST
resources on the same server. Therefore, it may not be possible to follow all COPY requirements for the COPY part of the MOVE method.
move a resource within a namespace that appears to belong to the same All WebDAV compliant resources MUST support the MOVE method.
server.
Support for the MOVE method does not guarantee the ability to move a
resource to a particular destination. For example, separate programs
may actually control different sets of resources on the same server.
Therefore, it may not be possible to move a resource within a
namespace that appears to belong to the same server.
If a resource exists at the destination, the destination resource If a resource exists at the destination, the destination resource
will be deleted as a side-effect of the MOVE operation, subject to will be deleted as a side-effect of the MOVE operation, subject to
the restrictions of the Overwrite header. the restrictions of the Overwrite header.
This method is idempotent, but not safe (see section 9.1 of This method is idempotent, but not safe (see Section 9.1 of
[RFC2616]). Responses to this method MUST NOT be cached. [RFC2616]). Responses to this method MUST NOT be cached.
9.9.1. MOVE for Properties 9.9.1. MOVE for Properties
Live properties described in this document SHOULD be moved along with Live properties described in this document SHOULD be moved along with
the resource, such that the resource has identically behaving live the resource, such that the resource has identically behaving live
properties at the destination resource, but not necessarily with the properties at the destination resource, but not necessarily with the
same values. Note that some live properties are defined such that same values. Note that some live properties are defined such that
the absence of the property has a specific meaning (e.g. a flag with the absence of the property has a specific meaning (e.g. a flag with
one meaning if present and the opposite if absent), and in these one meaning if present and the opposite if absent), and in these
skipping to change at page 65, line 43 skipping to change at page 64, line 43
and destination resources are the same. 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
'preserved-live-properties' postcondition). 'preserved-live-properties' postcondition).
412 (Precondition Failed) - A condition header failed. Specific to 412 (Precondition Failed) - A condition header failed. Specific to
MOVE, this could mean that the Overwrite header is "F" and the state MOVE, this could mean that the Overwrite header is "F" and the
of the destination URL is already mapped to a resource. destination URL is already mapped to a resource.
423 (Locked) - The source or the destination resource, the source or 423 (Locked) - The source or the destination resource, the source or
destination resource parent, or some resource within the source or destination resource parent, or some resource within the source or
destination collection, was locked. This response SHOULD contain the destination collection, was locked. This response SHOULD contain the
'lock-token-submitted' precondition element. 'lock-token-submitted' 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 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
skipping to change at page 67, line 15 skipping to change at page 66, line 15
HTTP/1.1 207 Multi-Status HTTP/1.1 207 Multi-Status
Content-Type: application/xml; charset="utf-8" Content-Type: application/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:multistatus xmlns:d='DAV:'> <d:multistatus xmlns:d='DAV:'>
<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:error><d:lock-token-submitted/></d:error>
</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 submitted for the destination
http://www.example.com/othercontainer/C2/. This means that the http://www.example.com/othercontainer/C2/. This means that the
resource /container/C2/ could not be moved. Because there was an resource /container/C2/ could not be moved. Because there was an
skipping to change at page 67, line 42 skipping to change at page 66, line 43
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
the XML request and response formats defined herein. the XML request and response formats defined herein.
This method is neither idempotent nor safe (see section 9.1 of This method is neither idempotent nor safe (see Section 9.1 of
[RFC2616]). Responses to this method MUST NOT be cached. [RFC2616]). Responses to this method MUST NOT be cached.
9.10.1. Creating a lock on existing resource 9.10.1. Creating a lock on existing resource
A LOCK request to an existing resource will create a lock on the A LOCK request to an existing resource will create a lock on the
resource identified by the Request-URI, provided the resource is not resource identified by the Request-URI, provided the resource is not
already locked with a conflicting lock. The resource identified in already locked with a conflicting lock. The resource identified in
the Request-URI becomes the root of the lock. Lock method requests the Request-URI becomes the root of the lock. Lock method requests
to create a new lock MUST have a XML request body. The server MUST to create a new lock MUST have an XML request body. The server MUST
preserve the information provided by the client in the 'owner' field preserve the information provided by the client in the 'owner' field
in the request body when the lock information is requested. The LOCK in the request body when the lock information is requested. The LOCK
request MAY have a Timeout header. request MAY have a Timeout header.
When a new lock is created, the LOCK response: When a new lock is created, the LOCK response:
o MUST contain a body with the value of the DAV:lockdiscovery o MUST contain a body with the value of the DAV:lockdiscovery
property in a prop XML element. This MUST contain the full property in a prop XML element. This MUST contain the full
information about the lock just granted, while information about information about the lock just granted, while information about
other (shared) locks is OPTIONAL. other (shared) locks is OPTIONAL.
o MUST include the Lock-Token response header with the token o MUST include the Lock-Token response header with the token
associated with the new lock. associated with the new lock.
9.10.2. Refreshing Locks 9.10.2. Refreshing Locks
A lock is refreshed by sending a LOCK request to the URL of a A lock is refreshed by sending a LOCK request to the URL of a
resource within the scope of the lock. This request MUST NOT have a resource within the scope of the lock. This request MUST NOT have a
body and it MUST specify which lock to refresh by using the 'Lock- body and it MUST specify which lock to refresh by using the 'If'
Token' header with a single lock token (only one lock may be header with a single lock token (only one lock may be refreshed at a
refreshed at a time). It MAY contain a Timeout header, which a time). The request MAY contain a Timeout header, which a server MAY
server MAY accept to change the duration remaining on the lock to the accept to change the duration remaining on the lock to the new value.
new value. A server MUST ignore the Depth header on a LOCK refresh. A server MUST ignore the Depth header on a LOCK refresh.
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 The Lock-Token header is not returned in the response for a
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
support this as well as the Lock-Token header.
Note that the Lock-Token header is not returned in the response for a
successful refresh LOCK request, but the LOCK response body MUST successful refresh LOCK request, but the LOCK response body MUST
contain the new value for the DAV:lockdiscovery body. contain the new value for the DAV:lockdiscovery body.
9.10.3. Depth and Locking 9.10.3. 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.
If the Depth header is set to infinity then the resource specified in If the Depth header is set to infinity then the resource specified in
the Request-URI along with all its internal members, all the way down the Request-URI along with all its members, all the way down the
the hierarchy, are to be locked. A successful result MUST return a hierarchy, are to be locked. A successful result MUST return a
single lock token which represents all the resources that have been single lock token. Similarly, if an UNLOCK is successfully executed
locked. If an UNLOCK is successfully executed on this token, all on this token, all associated resources are unlocked. Hence, partial
associated resources are unlocked. Hence, partial success is not an success is not an option for LOCK or UNLOCK. Either the entire
option. Either the entire hierarchy is locked or no resources are hierarchy is locked or no resources are locked.
locked.
If the lock cannot be granted to all resources, the server MUST If the lock cannot be granted to all resources, the server MUST
return a Multi-Status response with a 'response' element for at least return a Multi-Status response with a 'response' element for at least
one resource which prevented the lock from being granted, along with one resource which prevented the lock from being granted, along with
a suitable status code for that failure (e.g. 403 (Forbidden) or 423 a suitable status code for that failure (e.g. 403 (Forbidden) or 423
(Locked)). Additionally, if the resource causing the failure was not (Locked)). Additionally, if the resource causing the failure was not
the resource requested, then the server SHOULD include a 'response' the resource requested, then the server SHOULD include a 'response'
element for the Request-URI as well, with a 'status' element element for the Request-URI as well, with a 'status' element
containing 424 Failed Dependency. containing 424 Failed Dependency.
skipping to change at page 70, line 36 skipping to change at page 69, line 31
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.
423 (Locked), potentially with 'no-conflicting-lock' precondition 423 (Locked), potentially with 'no-conflicting-lock' precondition
code - There is already a lock on the resource which is not code - There is already a lock on the resource which is not
compatible with the requested lock (see lock compatibility table compatible with the requested lock (see lock compatibility table
above). above).
409 (Conflict), with 'lock-token-matches-request-uri' precondition 412 (Precondition Failed), with 'lock-token-matches-request-uri'
code - The LOCK request was made with a Lock-Token header, indicating precondition code - The LOCK request was made with a If header,
that the client wishes to refresh the given lock. However, the indicating that the client wishes to refresh the given lock.
Request-URI did not fall within the scope of the lock identified by However, the Request-URI did not fall within the scope of the lock
the token. The lock may have a scope that does not include the identified by the token. The lock may have a scope that does not
Request-URI, or the lock could have disappeared, or the token may be include the Request-URI, or the lock could have disappeared, or the
invalid. token may be invalid.
9.10.7. Example - Simple Lock Request 9.10.7. 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: application/xml; charset="utf-8" Content-Type: application/xml; charset="utf-8"
Content-Length: xxxx Content-Length: xxxx
skipping to change at page 75, line 32 skipping to change at page 74, line 32
The UNLOCK method removes the lock identified by the lock token in The UNLOCK method removes the lock identified by the lock token in
the Lock-Token request header. The Request-URI MUST identify a the Lock-Token request header. The Request-URI MUST identify a
resource within the scope of the lock. resource within the scope of the lock.
Note that use of Lock-Token header to provide the lock token is not Note that use of Lock-Token header to provide the lock token is not
consistent with other state-changing methods which all require an If consistent with other state-changing methods which all require an If
header with the lock token. Thus, the If header is not needed to header with the lock token. Thus, the If header is not needed to
provide the lock token. Naturally when the If header is present it provide the lock token. Naturally when the If header is present it
has its normal meaning as a conditional header. has its normal meaning as a conditional header.
For a successful response to this method, the server MUST remove the For a successful response to this method, the server MUST delete the
lock from the resource identified by the Request-URI and from all lock entirely.
other resources included in the lock.
If all resources which have been locked under the submitted lock If all resources which have been locked under the submitted lock
token can not be unlocked then the UNLOCK request MUST fail. token can not be unlocked then the UNLOCK request MUST fail.
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.
This method is idempotent, but not safe (see section 9.1 of This method is idempotent, but not safe (see Section 9.1 of
[RFC2616]). Responses to this method MUST NOT be cached. [RFC2616]). Responses to this method MUST NOT be cached.
9.11.1. Status Codes 9.11.1. Status Codes
In addition to the general status codes possible, the following In addition to the general status codes possible, the following
status codes have specific applicability to UNLOCK: status codes have specific applicability to UNLOCK:
204 (No Content) - Normal success response (rather than 200 OK, since 204 (No Content) - Normal success response (rather than 200 OK, since
200 OK would imply a response body, and an UNLOCK success response 200 OK would imply a response body, and an UNLOCK success response
does not normally contain a body) does not normally contain a body)
skipping to change at page 76, line 44 skipping to change at page 75, line 39
>>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
"urn:uuid:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7" is successfully "urn:uuid:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7" is successfully
removed from the resource removed from the resource
http://example.com/workspace/webdav/info.doc. If this lock included http://example.com/workspace/webdav/info.doc. If this lock included
more than just one resource, the lock is removed from all resources more than just one resource, the lock is removed from all resources
included in the lock. The 204 (No Content) status code is used included in the lock.
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.
10. HTTP Headers for Distributed Authoring 10. 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. WebDAV adds two new conditional headers to the set defined commas.
in HTTP: the If and Overwrite headers.
WebDAV adds two new conditional headers to the set defined in HTTP:
the If and Overwrite headers.
10.1. DAV Header 10.1. DAV Header
DAV = "DAV" ":" #( compliance-class ) DAV = "DAV" ":" #( compliance-class )
compliance-class = ( "1" | "2" | "3" | extend ) compliance-class = ( "1" | "2" | "3" | extend )
extend = Coded-URL | token extend = Coded-URL | token
Coded-URL = "<" absolute-URI ">" Coded-URL = "<" absolute-URI ">"
; No LWS allowed in Coded-URL ; No LWS allowed in Coded-URL
; absolute-URI is defined in RFC3986 ; absolute-URI is defined in RFC3986
skipping to change at page 78, line 12 skipping to change at page 77, line 14
this as a request header will need to carefully consider caching this as a request header will need to carefully consider caching
implications. implications.
10.2. Depth Header 10.2. Depth Header
Depth = "Depth" ":" ("0" | "1" | "infinity") Depth = "Depth" ":" ("0" | "1" | "infinity")
The Depth request header is used with methods executed on resources The Depth request header is used with methods executed on resources
which could potentially have internal members to indicate whether the which could potentially have internal members to indicate whether the
method is to be applied only to the resource ("Depth: 0"), to the method is to be applied only to the resource ("Depth: 0"), to the
resource and its immediate children, ("Depth: 1"), or the resource resource and its internal members only, ("Depth: 1"), or the resource
and all its progeny ("Depth: infinity"). and all its members ("Depth: infinity").
The Depth header is only supported if a method's definition The Depth header is only supported if a method's definition
explicitly provides for such support. explicitly provides for such support.
The following rules are the default behavior for any method that The following rules are the default behavior for any method that
supports the Depth header. A method may override these defaults by supports the Depth header. A method may override these defaults by
defining different behavior in its definition. defining different behavior in its definition.
Methods which support the Depth header may choose not to support all Methods which support the Depth header may choose not to support all
of the header's values and may define, on a case by case basis, the of the header's values and may define, on a case by case basis, the
skipping to change at page 78, line 51 skipping to change at page 78, line 6
That is, each header on a request with a Depth header MUST be applied That is, each header on a request with a Depth header MUST be applied
only to the Request-URI if it applies to any resource, unless only to the Request-URI if it applies to any resource, unless
specific Depth behavior is defined for that header. specific Depth behavior is defined for that header.
If a resource, source or destination, within the scope of the method If a resource, source or destination, within the scope of the method
with a Depth header is locked in such a way as to prevent the with a Depth header is locked in such a way as to prevent the
successful execution of the method, then the lock token for that successful execution of the method, then the lock token for that
resource MUST be submitted with the request in the If request header. resource MUST be submitted with the request in the If request header.
The Depth header only specifies the behavior of the method with The Depth header only specifies the behavior of the method with
regards to internal children. If a resource does not have internal regards to internal members. If a resource does not have internal
children then the Depth header MUST be ignored. members then the Depth header MUST be ignored.
Please note, however, that it is always an error to submit a value
for the Depth header that is not allowed by the method's definition.
Thus submitting a "Depth: 1" on a COPY, even if the resource does not
have internal members, will result in a 400 (Bad Request). The
method should fail not because the resource doesn't have internal
members, but because of the illegal value in the header.
10.3. Destination Header 10.3. Destination Header
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. two URIs as parameters.
Destination = "Destination" ":" Simple-ref Destination = "Destination" ":" Simple-ref
If the Destination value is an absolute URI, it may name a different If the Destination value is an absolute-URI (Section 4.3 of
server (or different port or scheme). If the source server cannot [RFC3986]), it may name a different server (or different port or
attempt a copy to the remote server, it MUST fail the request. Note scheme). If the source server cannot attempt a copy to the remote
that copying and moving resources to remote servers is not fully server, it MUST fail the request. Note that copying and moving
defined in this specification (e.g. specific error conditions). resources to remote servers is not fully defined in this
specification (e.g. specific error conditions).
If the Destination value is too long or otherwise unacceptable, the If the Destination value is too long or otherwise unacceptable, the
server SHOULD return 400 (Bad Request), ideally with helpful server SHOULD return 400 (Bad Request), ideally with helpful
information in an error body. information in an error body.
10.4. If Header 10.4. If Header
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]. However the If-Match header defined in Section 14.24 of [RFC2616]. However
the If header handles any state token as well as ETags. A typical the If header handles any state token as well as ETags. A typical
example of a state token is a lock token, and lock tokens are the example of a state token is a lock token, and lock tokens are the
only state tokens defined in this specification. only state tokens defined in this specification.
10.4.1. Purpose 10.4.1. Purpose
The If header has two distinct purposes: The If header has two distinct purposes:
o The first purpose is to make a request conditional by supplying a o The first purpose is to make a request conditional by supplying a
series of state lists. If the state lists are tested and all series of state lists with conditions that match tokens and ETags
fail, then the request MUST fail with a 412 (Precondition Failed) to specific resource. If this header is evaluated and all state
status. On the other hand, the request can succeed only if one of lists fail, then the request MUST fail with a 412 (Precondition
the described state lists succeeds. The success criteria for Failed) status. On the other hand, the request can succeed only
state lists are defined in Section 10.4.4 below. if one of the described state lists succeeds. The success
criteria for state lists and matching functions are defined in
Section 10.4.3 and Section 10.4.4.
o Additionally, the mere fact that a state token appears in an If o Additionally, the mere fact that a state token appears in an If
header means that is has been "submitted" with the request. In header means that it has been "submitted" with the request. In
general, this is used to indicate that the client has knowledge of general, this is used to indicate that the client has knowledge of
that state token. The meaning of submitting a state token depends that state token. The semantics for submitting a state token
on its type (for lock tokens, please refer to Section 6). depend on its type (for lock tokens, please refer to Section 6).
Note that these two purposes need to be treated distinctly: a state Note that these two purposes need to be treated distinctly: a state
token counts as being submitted independently of whether the server token counts as being submitted independently of whether the server
actually has evaluated the state list it appears in, and also actually has evaluated the state list it appears in, and also
independently of whether the condition it expressed was found to be independently of whether the condition it expressed was found to be
true or not. true or not.
10.4.2. Syntax 10.4.2. Syntax
If = "If" ":" ( 1*No-tag-list | 1*Tagged-list ) If = "If" ":" ( 1*No-tag-list | 1*Tagged-list )
skipping to change at page 81, line 36 skipping to change at page 80, line 32
Lists. They evaluate to true if and only if any of the contained Lists. They evaluate to true if and only if any of the contained
lists evaluates to true (that is, if there's more than one List, that lists evaluates to true (that is, if there's more than one List, that
List sequence represents a logical disjunction of the Lists). List sequence represents a logical disjunction of the Lists).
Finally, the whole If header evaluates to true if and only if at Finally, the whole If header evaluates to true if and only if at
least one of the No-tag-list or Tagged-list productions evaluates to least one of the No-tag-list or Tagged-list productions evaluates to
true. If the header evaluates to false, the server MUST reject the true. If the header evaluates to false, the server MUST reject the
request with a 412 (Precondition Failed) status. Otherwise, request with a 412 (Precondition Failed) status. Otherwise,
execution of the request can proceed as if the header wasn't present. execution of the request can proceed as if the header wasn't present.
10.4.4. Matching Tokens and ETags 10.4.4. Matching State Tokens and ETags
When performing If header processing, the definition of a matching When performing If header processing, the definition of a matching
state token or entity tag is as follows: state token or entity tag is as follows:
Identifying a resource: The resource is identified by the URI along Identifying a resource: The resource is identified by the URI along
with the token, in tagged list production, or by the Request-URI in with the token, in tagged list production, or by the Request-URI in
untagged list production. untagged list production.
Matching entity tag: Where the entity tag matches an entity tag Matching entity tag: Where the entity tag matches an entity tag
associated with the identified resource. Servers MUST use either the associated with the identified resource. Servers MUST use either the
weak or the strong comparison function defined in Section 13.3.3 of weak or the strong comparison function defined in Section 13.3.3 of
[RFC2616]. [RFC2616].
Matching state token: Where there is an exact match between the state Matching state token: Where there is an exact match between the state
token in the If header and any state token on the identified token in the If header and any state token on the identified
resource. A lock state token is considered to match if the resource resource. A lock state token is considered to match if the resource
is anywhere in the scope of the lock. is anywhere in the scope of the lock.
Matching unmapped URLs: for both ETags and state tokens, treat as if Handling unmapped URLs: for both ETags and state tokens, treat as if
the URL identified a resource that exists but does not have the the URL identified a resource that exists but does not have the
specified state. specified state.
10.4.5. Example - No-tag Production 10.4.5. If Header and Non-DAV Aware Proxies
Non-DAV aware proxies will not honor the If header, since they will
not understand the If header, and HTTP requires non-understood
headers to be ignored. When communicating with HTTP/1.1 proxies, the
client MUST use the "Cache-Control: no-cache" request header so as to
prevent the proxy from improperly trying to service the request from
its cache. When dealing with HTTP/1.0 proxies the "Pragma: no-cache"
request header MUST be used for the same reason.
As in general clients may not be able to reliably detect non-DAV
aware intermediates, they are advised to always prevent caching using
the request directives mentioned above.
10.4.6. Example - No-tag Production
If: (<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2> If: (<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>
["I am an ETag"]) ["I am an ETag"])
(["I am another ETag"]) (["I am another ETag"])
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 be in the Request-URI be locked with the specified lock token and be in the
state identified by the "I am an ETag" ETag or in the state state identified by the "I am an ETag" ETag or in the state
identified by the second ETag "I am another ETag". identified by the second ETag "I am another ETag".
skipping to change at page 82, line 33 skipping to change at page 81, line 44
( (
is-locked-with(urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2) AND is-locked-with(urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2) AND
matches-etag("I am an ETag") matches-etag("I am an ETag")
) )
OR OR
( (
matches-etag("I am another ETag") matches-etag("I am another ETag")
) )
10.4.6. Example - using "Not" with No-tag Production 10.4.7. Example - using "Not" with No-tag Production
If: (Not <urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2> If: (Not <urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>
<urn:uuid:58f202ac-22cf-11d1-b12d-002035b29092>) <urn:uuid:58f202ac-22cf-11d1-b12d-002035b29092>)
This If header requires that the resource must not be locked with a This If header requires that the resource must not be locked with a
lock having the lock token lock having the lock token
urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 and must be locked by a urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 and must be locked by a
lock with the lock token lock with the lock token
urn:uuid:58f202ac-22cf-11d1-b12d-002035b29092. urn:uuid:58f202ac-22cf-11d1-b12d-002035b29092.
10.4.7. Example - causing a Condition to always evaluate to True 10.4.8. Example - causing a Condition to always evaluate to True
There may be cases where a client wishes to submit state tokens, but There may be cases where a client wishes to submit state tokens, but
doesn't want the request to fail just because the state token isn't doesn't want the request to fail just because the state token isn't
current anymore. One simple way to do this is to include a Condition current anymore. One simple way to do this is to include a Condition
that is known to always evaluate to true, such as in: that is known to always evaluate to true, such as in:
If: (<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>) If: (<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>)
(Not <DAV:no-lock>) (Not <DAV:no-lock>)
"DAV:no-lock" is known to never represent a current lock token, as "DAV:no-lock" is known to never represent a current lock token, as
lock tokens are assigned by the server, following the uniqueness lock tokens are assigned by the server, following the uniqueness
requirements described in Section 6.5, therefore in particular requirements described in Section 6.5, therefore in particular
exclude URIs in the "DAV:" scheme. Thus, by applying "Not" to a exclude URIs in the "DAV:" scheme. Thus, by applying "Not" to a
known not to be current state token, the Condition always evaluates known not to be current state token, the Condition always evaluates
to true. Consequently, the whole If header will always evaluate to to true. Consequently, the whole If header will always evaluate to
true, and the lock token true, and the lock token
urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 will be submitted in urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 will be submitted in
any case. any case.
10.4.8. Example - Tagged List If header in COPY 10.4.9. Example - Tagged List If header in COPY
>>Request >>Request
COPY /resource1 HTTP/1.1 COPY /resource1 HTTP/1.1
Host: www.example.com Host: www.example.com
Destination: /resource2 Destination: /resource2
If: </resource1> If: </resource1>
(<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2> (<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>
[W/"A weak ETag"]) (["strong ETag"]) [W/"A weak ETag"]) (["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 "(<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2> [W/"A specified by "(<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2> [W/"A
weak ETag"]) (["strong ETag"])", that is, it either must be locked weak ETag"]) (["strong ETag"])", that is, it either must be locked
with a lock token of "urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2" with a lock token of "urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2"
and have a weak entity tag W/"A weak ETag" or it must have a strong and have a weak entity tag W/"A weak ETag" or it must have a strong
entity tag "strong ETag". entity tag "strong ETag".
10.4.9. Example - Matching lock tokens with collection locks 10.4.10. Example - Matching lock tokens with collection locks
DELETE /specs/rfc2518.txt HTTP/1.1 DELETE /specs/rfc2518.txt HTTP/1.1
Host: www.example.com Host: www.example.com
If: <http://www.example.com/specs/> If: <http://www.example.com/specs/>
(<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>) (<urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2>)
For this example, the lock token must be compared to the identified For this example, the lock token must be compared to the identified
resource, which is the 'specs' collection identified by the URL in resource, which is the 'specs' collection identified by the URL in
the tagged list production. If the 'specs' collection is not locked the tagged list production. If the 'specs' collection is not locked
by a lock with the specified lock token, the request MUST fail. by a lock with the specified lock token, the request MUST fail.
Otherwise, this request could succeed, because the If header Otherwise, this request could succeed, because the If header
evaluates to true, and because the lock token for the lock affecting evaluates to true, and because the lock token for the lock affecting
the affected resource has been submitted. the affected resource has been submitted.
10.4.10. Example - Matching ETags on unmapped URLs 10.4.11. Example - Matching ETags on unmapped URLs
Consider a collection "/specs" that does not contain the member Consider a collection "/specs" that does not contain the member
"/specs/rfc2518.doc". In this case, the If header "/specs/rfc2518.doc". In this case, the If header
If: </specs/rfc2518.doc> (["4217"]) If: </specs/rfc2518.doc> (["4217"])
will evaluate to false (the URI isn't mapped, thus the resource will evaluate to false (the URI isn't mapped, thus the resource
identified by the URI doesn't have an entity matching the ETag identified by the URI doesn't have an entity matching the ETag
"4217"). "4217").
On the other hand, an If header of On the other hand, an If header of
If: </specs/rfc2518.doc> (Not ["4217"]) If: </specs/rfc2518.doc> (Not ["4217"])
will consequently evaluate to true. will consequently evaluate to true.
Note that as defined above in Section 10.4.4, the same considerations Note that as defined above in Section 10.4.4, the same considerations
apply to matching state tokens. apply to matching state tokens.
10.4.11. If Header and Non-DAV Aware Proxies
Non-DAV aware proxies will not honor the If header, since they will
not understand the If header, and HTTP requires non-understood
headers to be ignored. When communicating with HTTP/1.1 proxies, the
client MUST use the "Cache-Control: no-cache" request header so as to
prevent the proxy from improperly trying to service the request from
its cache. When dealing with HTTP/1.0 proxies the "Pragma: no-cache"
request header MUST be used for the same reason.
As in general clients may not be able to reliably detect non-DAV
aware intermediates, they are advised to always prevent caching using
the request directives mentioned above.
10.5. Lock-Token Header 10.5. Lock-Token Header
Lock-Token = "Lock-Token" ":" Coded-URL Lock-Token = "Lock-Token" ":" Coded-URL
The Lock-Token request header is used with the UNLOCK method to The Lock-Token request header is used with the UNLOCK method to
identify the lock to be removed. The lock token in the Lock-Token identify the lock to be removed. The lock token in the Lock-Token
request header MUST identify a lock that contains the resource request header MUST identify a lock that contains the resource
identified by Request-URI as a member. identified by Request-URI as a member.
The Lock-Token response header is used with the LOCK method to The Lock-Token response header is used with the LOCK method to
indicate the lock token created as a result of a successful LOCK indicate the lock token created as a result of a successful LOCK
request to create a new lock. request to create a new lock.
10.6. Overwrite Header 10.6. Overwrite Header
Overwrite = "Overwrite" ":" ("T" | "F") Overwrite = "Overwrite" ":" ("T" | "F")
The Overwrite request header specifies whether the server should The Overwrite request header specifies whether the server should
overwrite a resource mapped to the destination URL during a COPY or overwrite a resource mapped to the destination URL during a COPY or
MOVE. A value of "F" states that the server must not perform the MOVE. A value of "F" states that the server must not perform the
COPY or MOVE operation if the state of the destination URL does map COPY or MOVE operation if the destination URL does map to a resource.
to a resource. If the overwrite header is not included in a COPY or If the overwrite header is not included in a COPY or MOVE request
MOVE request then the resource MUST treat the request as if it has an then the resource MUST treat the request as if it has an overwrite
overwrite header of value "T". While the Overwrite header appears to header of value "T". While the Overwrite header appears to duplicate
duplicate the functionality of the If-Match: * header of HTTP/1.1, the functionality of the If-Match: * header of HTTP/1.1, If-Match
If-Match applies only to the Request-URI, and not to the Destination applies only to the Request-URI, and not to the Destination of a COPY
of a COPY or MOVE. or MOVE.
If a COPY or MOVE is not performed due to the value of the Overwrite If a COPY or MOVE is not performed due to the value of the Overwrite
header, the method MUST fail with a 412 (Precondition Failed) status header, the method MUST fail with a 412 (Precondition Failed) status
code. The server MUST do authorization checks before checking this code. The server MUST do authorization checks before checking this
or any conditional header. or any conditional header.
All DAV compliant resources MUST support the Overwrite header. All DAV compliant resources MUST support the Overwrite header.
10.7. Timeout Request Header 10.7. Timeout Request Header
skipping to change at page 88, line 13 skipping to change at page 86, line 13
action. action.
12. Use of HTTP Status Codes 12. Use of HTTP Status Codes
These HTTP codes are not redefined, but their use is somewhat These HTTP codes are not redefined, but their use is somewhat
extended by WebDAV methods and requirements. In general, many HTTP extended by WebDAV methods and requirements. In general, many HTTP
status codes can be used in response to any request, not just in status codes can be used in response to any request, not just in
cases described in this document. Note also that WebDAV servers are cases described in this document. Note also that WebDAV servers are
known to use 300-level redirect responses (and early interoperability known to use 300-level redirect responses (and early interoperability
tests found clients unprepared to see those responses). A 300-level tests found clients unprepared to see those responses). A 300-level
request MUST NOT be used when the server has created a new resource response MUST NOT be used when the server has created a new resource
in response to the request. in response to the request.
12.1. 412 Precondition Failed 12.1. 412 Precondition Failed
Any request can contain a conditional header defined in HTTP (If- Any request can contain a conditional header defined in HTTP (If-
Match, If-Modified-Since, etc.) or the "If" or "Overwrite" Match, If-Modified-Since, etc.) or the "If" or "Overwrite"
conditional headers defined in this specification. If the server conditional headers defined in this specification. If the server
evaluates a conditional header, and if that condition fails to hold, evaluates a conditional header, and if that condition fails to hold,
then this error code MUST be returned. On the other hand, if the then this error code MUST be returned. On the other hand, if the
client did not include a conditional header in the request, then the client did not include a conditional header in the request, then the
server MUST NOT use this error. server MUST NOT use this status code.
12.2. 414 Request-URI Too Long 12.2. 414 Request-URI Too Long
This status code is used in HTTP 1.1 only for Request-URIs, not URIs This status code is used in HTTP 1.1 only for Request-URIs, not URIs
in other locations. in other locations.
13. Multi-Status Response 13. Multi-Status Response
A Multi-Status response contains one 'response' element for each A Multi-Status response conveys information about multiple resources
resource in the scope of the request (in no required order) or MAY be in situations where multiple status codes might be appropriate. The
empty if no resources match the request. The default 207 (Multi- default Multi-Status response body is a text/xml or application/xml
Status) response body is a text/xml or application/xml HTTP entity HTTP entity with a 'multistatus' root element. Further elements
that contains a single XML element called 'multistatus', which contain 200, 300, 400, and 500 series status codes generated during
contains a set of XML elements called response which contain 200, the method invocation. 100 series status codes SHOULD NOT be recorded
300, 400, and 500 series status codes generated during the method in a 'response' XML element.
invocation. 100 series status codes SHOULD NOT be recorded in a
'response' XML element. The 207 status code itself MUST NOT be
considered a success response, it is only completely successful if
all 'response' elements inside contain success status codes.
The body of a 207 Multi-Status response MUST contain a URL associated Although '207' is used as the overall response status code, the
with each specific status code, so that the client can tell whether recipient needs to consult