draft-ietf-webdav-rfc2518bis-18.txt   rfc4918.txt 
WebDAV L. Dusseault, Ed. Network Working Group L. Dusseault, Ed.
Internet-Draft CommerceNet Request for Comments: 4918 CommerceNet
Obsoletes: 2518 (if approved) February 15, 2007
Intended status: Standards Track
Expires: August 19, 2007
HTTP Extensions for Distributed Authoring - WebDAV
draft-ietf-webdav-rfc2518bis-18
Status of this Memo
By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Category: Standards Track
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)
http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at Status of This Memo
http://www.ietf.org/shadow.html.
This Internet-Draft will expire on August 19, 2007. This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice Copyright Notice
Copyright (C) The IETF Trust (2007). Copyright (C) The IETF Trust (2007).
Abstract Abstract
WebDAV consists of a set of methods, headers, and content-types Web Distributed Authoring and Versioning (WebDAV) consists of a set
ancillary to HTTP/1.1 for the management of resource properties, of methods, headers, and content-types ancillary to HTTP/1.1 for the
creation and management of resource collections, URL namespace management of resource properties, creation and management of
manipulation, and resource locking (collision avoidance). resource collections, URL namespace manipulation, and resource
locking (collision avoidance).
RFC2518 was published in February 1999, and this specification makes RFC 2518 was published in February 1999, and this specification
minor revisions mostly due to interoperability experience. obsoletes RFC 2518 with minor revisions mostly due to
interoperability experience.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 8 1. Introduction ....................................................7
2. Notational Conventions . . . . . . . . . . . . . . . . . . . 10 2. Notational Conventions ..........................................8
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 11 3. Terminology .....................................................8
4. Data Model for Resource Properties . . . . . . . . . . . . . 13 4. Data Model for Resource Properties .............................10
4.1. The Resource Property Model . . . . . . . . . . . . . . 13 4.1. The Resource Property Model ...............................10
4.2. Properties and HTTP Headers . . . . . . . . . . . . . . 13 4.2. Properties and HTTP Headers ...............................10
4.3. Property Values . . . . . . . . . . . . . . . . . . . . 13 4.3. Property Values ...........................................10
4.3.1. Example - Property with Mixed Content . . . . . . . 15 4.3.1. Example - Property with Mixed Content ..............12
4.4. Property Names . . . . . . . . . . . . . . . . . . . . . 17 4.4. Property Names ............................................14
4.5. Source Resources and Output Resources . . . . . . . . . 17 4.5. Source Resources and Output Resources .....................14
5. Collections of Web Resources . . . . . . . . . . . . . . . . 18 5. Collections of Web Resources ...................................14
5.1. HTTP URL Namespace Model . . . . . . . . . . . . . . . . 18 5.1. HTTP URL Namespace Model ..................................15
5.2. Collection Resources . . . . . . . . . . . . . . . . . . 18 5.2. Collection Resources ......................................15
6. Locking . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 6. Locking ........................................................17
6.1. Lock Model . . . . . . . . . . . . . . . . . . . . . . . 21 6.1. Lock Model ................................................18
6.2. Exclusive Vs. Shared Locks . . . . . . . . . . . . . . . 22 6.2. Exclusive vs. Shared Locks ................................19
6.3. Required Support . . . . . . . . . . . . . . . . . . . . 23 6.3. Required Support ..........................................20
6.4. Lock Creator and Privileges . . . . . . . . . . . . . . 23 6.4. Lock Creator and Privileges ...............................20
6.5. Lock Tokens . . . . . . . . . . . . . . . . . . . . . . 24 6.5. Lock Tokens ...............................................21
6.6. Lock Timeout . . . . . . . . . . . . . . . . . . . . . . 25 6.6. Lock Timeout ..............................................21
6.7. Lock Capability Discovery . . . . . . . . . . . . . . . 25 6.7. Lock Capability Discovery .................................22
6.8. Active Lock Discovery . . . . . . . . . . . . . . . . . 26 6.8. Active Lock Discovery .....................................22
7. Write Lock . . . . . . . . . . . . . . . . . . . . . . . . . 27 7. Write Lock .....................................................23
7.1. Write Locks and Properties . . . . . . . . . . . . . . . 27 7.1. Write Locks and Properties ................................24
7.2. Avoiding Lost Updates . . . . . . . . . . . . . . . . . 28 7.2. Avoiding Lost Updates .....................................24
7.3. Write Locks and Unmapped URLs . . . . . . . . . . . . . 29 7.3. Write Locks and Unmapped URLs .............................25
7.4. Write Locks and Collections . . . . . . . . . . . . . . 30 7.4. Write Locks and Collections ...............................26
7.5. Write Locks and the If Request Header . . . . . . . . . 31 7.5. Write Locks and the If Request Header .....................28
7.5.1. Example - Write Lock and COPY . . . . . . . . . . . 32 7.5.1. Example - Write Lock and COPY ......................28
7.5.2. Example - Deleting a Member of a Locked Collection . 32 7.5.2. Example - Deleting a Member of a Locked
7.6. Write Locks and COPY/MOVE . . . . . . . . . . . . . . . 33 Collection .........................................29
7.7. Refreshing Write Locks . . . . . . . . . . . . . . . . . 34 7.6. Write Locks and COPY/MOVE .................................30
8. General Request and Response Handling . . . . . . . . . . . . 35 7.7. Refreshing Write Locks ....................................30
8.1. Precedence in Error Handling . . . . . . . . . . . . . . 35 8. General Request and Response Handling ..........................31
8.2. Use of XML . . . . . . . . . . . . . . . . . . . . . . . 35 8.1. Precedence in Error Handling ..............................31
8.3. URL Handling . . . . . . . . . . . . . . . . . . . . . . 36 8.2. Use of XML ................................................31
8.3.1. Example - Correct URL Handling . . . . . . . . . . . 36 8.3. URL Handling ..............................................32
8.4. Required Bodies in Requests . . . . . . . . . . . . . . 37 8.3.1. Example - Correct URL Handling .....................32
8.5. HTTP Headers for use in WebDAV . . . . . . . . . . . . . 37 8.4. Required Bodies in Requests ...............................33
8.6. ETag . . . . . . . . . . . . . . . . . . . . . . . . . . 37 8.5. HTTP Headers for Use in WebDAV ............................33
8.7. Including Error Response Bodies . . . . . . . . . . . . 38 8.6. ETag ......................................................33
8.8. Impact of Namespace Operations on Cache Validators . . . 38 8.7. Including Error Response Bodies ...........................34
9. HTTP Methods for Distributed Authoring . . . . . . . . . . . 40 8.8. Impact of Namespace Operations on Cache Validators ........34
9.1. PROPFIND Method . . . . . . . . . . . . . . . . . . . . 40 9. HTTP Methods for Distributed Authoring .........................35
9.1.1. PROPFIND Status Codes . . . . . . . . . . . . . . . 41 9.1. PROPFIND Method ...........................................35
9.1.2. Status Codes for Use in 'propstat' Element . . . . . 42 9.1.1. PROPFIND Status Codes ..............................37
9.1.3. Example - Retrieving Named Properties . . . . . . . 42 9.1.2. Status Codes for Use in 'propstat' Element .........37
9.1.3. Example - Retrieving Named Properties ..............38
9.1.4. Example - Using 'propname' to Retrieve All 9.1.4. Example - Using 'propname' to Retrieve All
Property Names . . . . . . . . . . . . . . . . . . . 44 Property Names .....................................39
9.1.5. Example - Using So-called 'allprop' . . . . . . . . 46 9.1.5. Example - Using So-called 'allprop' ................41
9.1.6. Example - Using 'allprop' with 'include' . . . . . . 49 9.1.6. Example - Using 'allprop' with 'include' ...........43
9.2. PROPPATCH Method . . . . . . . . . . . . . . . . . . . . 49 9.2. PROPPATCH Method ..........................................44
9.2.1. Status Codes for Use in 'propstat' Element . . . . . 50 9.2.1. Status Codes for Use in 'propstat' Element .........44
9.2.2. Example - PROPPATCH . . . . . . . . . . . . . . . . 51 9.2.2. Example - PROPPATCH ................................45
9.3. MKCOL Method . . . . . . . . . . . . . . . . . . . . . . 52 9.3. MKCOL Method ..............................................46
9.3.1. MKCOL Status Codes . . . . . . . . . . . . . . . . . 53 9.3.1. MKCOL Status Codes .................................47
9.3.2. Example - MKCOL . . . . . . . . . . . . . . . . . . 53 9.3.2. Example - MKCOL ....................................47
9.4. GET, HEAD for Collections . . . . . . . . . . . . . . . 54 9.4. GET, HEAD for Collections .................................48
9.5. POST for Collections . . . . . . . . . . . . . . . . . . 54 9.5. POST for Collections ......................................48
9.6. DELETE Requirements . . . . . . . . . . . . . . . . . . 54 9.6. DELETE Requirements .......................................48
9.6.1. DELETE for Collections . . . . . . . . . . . . . . . 55 9.6.1. DELETE for Collections .............................49
9.6.2. Example - DELETE . . . . . . . . . . . . . . . . . . 55 9.6.2. Example - DELETE ...................................49
9.7. PUT Requirements . . . . . . . . . . . . . . . . . . . . 56 9.7. PUT Requirements ..........................................50
9.7.1. PUT for Non-Collection Resources . . . . . . . . . . 56 9.7.1. PUT for Non-Collection Resources ...................50
9.7.2. PUT for Collections . . . . . . . . . . . . . . . . 57 9.7.2. PUT for Collections ................................51
9.8. COPY Method . . . . . . . . . . . . . . . . . . . . . . 57 9.8. COPY Method ...............................................51
9.8.1. COPY for Non-collection Resources . . . . . . . . . 57 9.8.1. COPY for Non-collection Resources ..................51
9.8.2. COPY for Properties . . . . . . . . . . . . . . . . 58 9.8.2. COPY for Properties ................................52
9.8.3. COPY for Collections . . . . . . . . . . . . . . . . 58 9.8.3. COPY for Collections ...............................52
9.8.4. COPY and Overwriting Destination Resources . . . . . 59 9.8.4. COPY and Overwriting Destination Resources .........53
9.8.5. Status Codes . . . . . . . . . . . . . . . . . . . . 60 9.8.5. Status Codes .......................................54
9.8.6. Example - COPY with Overwrite . . . . . . . . . . . 61 9.8.6. Example - COPY with Overwrite ......................55
9.8.7. Example - COPY with No Overwrite . . . . . . . . . . 61 9.8.7. Example - COPY with No Overwrite ...................55
9.8.8. Example - COPY of a Collection . . . . . . . . . . . 62 9.8.8. Example - COPY of a Collection .....................56
9.9. MOVE Method . . . . . . . . . . . . . . . . . . . . . . 62 9.9. MOVE Method ...............................................56
9.9.1. MOVE for Properties . . . . . . . . . . . . . . . . 63 9.9.1. MOVE for Properties ................................57
9.9.2. MOVE for Collections . . . . . . . . . . . . . . . . 63 9.9.2. MOVE for Collections ...............................57
9.9.3. MOVE and the Overwrite Header . . . . . . . . . . . 64 9.9.3. MOVE and the Overwrite Header ......................58
9.9.4. Status Codes . . . . . . . . . . . . . . . . . . . . 64 9.9.4. Status Codes .......................................59
9.9.5. Example - MOVE of a Non-Collection . . . . . . . . . 65 9.9.5. Example - MOVE of a Non-Collection .................60
9.9.6. Example - MOVE of a Collection . . . . . . . . . . . 66 9.9.6. Example - MOVE of a Collection .....................60
9.10. LOCK Method . . . . . . . . . . . . . . . . . . . . . . 67 9.10. LOCK Method ..............................................61
9.10.1. Creating a Lock on an Existing Resource . . . . . . 67 9.10.1. Creating a Lock on an Existing Resource ...........61
9.10.2. Refreshing Locks . . . . . . . . . . . . . . . . . . 67 9.10.2. Refreshing Locks ..................................62
9.10.3. Depth and Locking . . . . . . . . . . . . . . . . . 68 9.10.3. Depth and Locking .................................62
9.10.4. Locking Unmapped URLs . . . . . . . . . . . . . . . 68 9.10.4. Locking Unmapped URLs .............................63
9.10.5. Lock Compatibility Table . . . . . . . . . . . . . . 69 9.10.5. Lock Compatibility Table ..........................63
9.10.6. LOCK Responses . . . . . . . . . . . . . . . . . . . 69 9.10.6. LOCK Responses ....................................63
9.10.7. Example - Simple Lock Request . . . . . . . . . . . 70 9.10.7. Example - Simple Lock Request .....................64
9.10.8. Example - Refreshing a Write Lock . . . . . . . . . 72 9.10.8. Example - Refreshing a Write Lock .................65
9.10.9. Example - Multi-Resource Lock Request . . . . . . . 73 9.10.9. Example - Multi-Resource Lock Request .............66
9.11. UNLOCK Method . . . . . . . . . . . . . . . . . . . . . 74 9.11. UNLOCK Method ............................................68
9.11.1. Status Codes . . . . . . . . . . . . . . . . . . . . 74 9.11.1. Status Codes ......................................68
9.11.2. Example - UNLOCK . . . . . . . . . . . . . . . . . . 75 9.11.2. Example - UNLOCK ..................................69
10. HTTP Headers for Distributed Authoring . . . . . . . . . . . 76 10. HTTP Headers for Distributed Authoring ........................69
10.1. DAV Header . . . . . . . . . . . . . . . . . . . . . . . 76 10.1. DAV Header ...............................................69
10.2. Depth Header . . . . . . . . . . . . . . . . . . . . . . 77 10.2. Depth Header .............................................70
10.3. Destination Header . . . . . . . . . . . . . . . . . . . 78 10.3. Destination Header .......................................71
10.4. If Header . . . . . . . . . . . . . . . . . . . . . . . 78 10.4. If Header ................................................72
10.4.1. Purpose . . . . . . . . . . . . . . . . . . . . . . 78 10.4.1. Purpose ...........................................72
10.4.2. Syntax . . . . . . . . . . . . . . . . . . . . . . . 79 10.4.2. Syntax ............................................72
10.4.3. List Evaluation . . . . . . . . . . . . . . . . . . 80 10.4.3. List Evaluation ...................................73
10.4.4. Matching State Tokens and ETags . . . . . . . . . . 80 10.4.4. Matching State Tokens and ETags ...................74
10.4.5. If Header and Non-DAV Aware Proxies . . . . . . . . 81 10.4.5. If Header and Non-DAV-Aware Proxies ...............74
10.4.6. Example - No-tag Production . . . . . . . . . . . . 81 10.4.6. Example - No-tag Production .......................75
10.4.7. Example - using "Not" with No-tag Production . . . . 81 10.4.7. Example - Using "Not" with No-tag Production ......75
10.4.8. Example - causing a Condition to always evaluate 10.4.8. Example - Causing a Condition to Always
to True . . . . . . . . . . . . . . . . . . . . . . 82 Evaluate to True ..................................75
10.4.9. Example - Tagged List If header in COPY . . . . . . 82 10.4.9. Example - Tagged List If Header in COPY ...........76
10.4.10. Example - Matching lock tokens with collection 10.4.10. Example - Matching Lock Tokens with
locks . . . . . . . . . . . . . . . . . . . . . . . 82 Collection Locks .................................76
10.4.11. Example - Matching ETags on unmapped URLs . . . . . 83 10.4.11. Example - Matching ETags on Unmapped URLs ........76
10.5. Lock-Token Header . . . . . . . . . . . . . . . . . . . 83 10.5. Lock-Token Header ........................................77
10.6. Overwrite Header . . . . . . . . . . . . . . . . . . . . 83 10.6. Overwrite Header .........................................77
10.7. Timeout Request Header . . . . . . . . . . . . . . . . . 84 10.7. Timeout Request Header ...................................78
11. Status Code Extensions to HTTP/1.1 . . . . . . . . . . . . . 85 11. Status Code Extensions to HTTP/1.1 ............................78
11.1. 207 Multi-Status . . . . . . . . . . . . . . . . . . . . 85 11.1. 207 Multi-Status .........................................78
11.2. 422 Unprocessable Entity . . . . . . . . . . . . . . . . 85 11.2. 422 Unprocessable Entity .................................78
11.3. 423 Locked . . . . . . . . . . . . . . . . . . . . . . . 85 11.3. 423 Locked ...............................................78
11.4. 424 Failed Dependency . . . . . . . . . . . . . . . . . 85 11.4. 424 Failed Dependency ....................................79
11.5. 507 Insufficient Storage . . . . . . . . . . . . . . . . 85 11.5. 507 Insufficient Storage .................................79
12. Use of HTTP Status Codes . . . . . . . . . . . . . . . . . . 86 12. Use of HTTP Status Codes ......................................79
12.1. 412 Precondition Failed . . . . . . . . . . . . . . . . 86 12.1. 412 Precondition Failed ..................................79
12.2. 414 Request-URI Too Long . . . . . . . . . . . . . . . . 86 12.2. 414 Request-URI Too Long .................................79
13. Multi-Status Response . . . . . . . . . . . . . . . . . . . . 87 13. Multi-Status Response .........................................80
13.1. Response Headers . . . . . . . . . . . . . . . . . . . . 87 13.1. Response Headers .........................................80
13.2. Handling Redirected Child Resources . . . . . . . . . . 88 13.2. Handling Redirected Child Resources ......................81
13.3. Internal Status Codes . . . . . . . . . . . . . . . . . 88 13.3. Internal Status Codes ....................................81
14. XML Element Definitions . . . . . . . . . . . . . . . . . . . 89 14. XML Element Definitions .......................................81
14.1. activelock XML Element . . . . . . . . . . . . . . . . . 89 14.1. activelock XML Element ...................................81
14.2. allprop XML Element . . . . . . . . . . . . . . . . . . 89 14.2. allprop XML Element ......................................82
14.3. collection XML Element . . . . . . . . . . . . . . . . . 89 14.3. collection XML Element ...................................82
14.4. depth XML Element . . . . . . . . . . . . . . . . . . . 89 14.4. depth XML Element ........................................82
14.5. error XML Element . . . . . . . . . . . . . . . . . . . 90 14.5. error XML Element ........................................82
14.6. exclusive XML Element . . . . . . . . . . . . . . . . . 90 14.6. exclusive XML Element ....................................83
14.7. href XML Element . . . . . . . . . . . . . . . . . . . . 90 14.7. href XML Element .........................................83
14.8. include XML Element . . . . . . . . . . . . . . . . . . 91 14.8. include XML Element ......................................83
14.9. location XML Element . . . . . . . . . . . . . . . . . . 91 14.9. location XML Element .....................................83
14.10. lockentry XML Element . . . . . . . . . . . . . . . . . 91 14.10. lockentry XML Element ...................................84
14.11. lockinfo XML Element . . . . . . . . . . . . . . . . . . 91 14.11. lockinfo XML Element ....................................84
14.12. lockroot XML Element . . . . . . . . . . . . . . . . . . 92 14.12. lockroot XML Element ....................................84
14.13. lockscope XML Element . . . . . . . . . . . . . . . . . 92 14.13. lockscope XML Element ...................................84
14.14. locktoken XML Element . . . . . . . . . . . . . . . . . 92 14.14. locktoken XML Element ...................................85
14.15. locktype XML Element . . . . . . . . . . . . . . . . . . 92 14.15. locktype XML Element ....................................85
14.16. multistatus XML Element . . . . . . . . . . . . . . . . 93 14.16. multistatus XML Element .................................85
14.17. owner XML Element . . . . . . . . . . . . . . . . . . . 93 14.17. owner XML Element .......................................85
14.18. prop XML Element . . . . . . . . . . . . . . . . . . . . 93 14.18. prop XML Element ........................................86
14.19. propertyupdate XML Element . . . . . . . . . . . . . . . 94 14.19. propertyupdate XML Element ..............................86
14.20. propfind XML Element . . . . . . . . . . . . . . . . . . 94 14.20. propfind XML Element ....................................86
14.21. propname XML Element . . . . . . . . . . . . . . . . . . 94 14.21. propname XML Element ....................................87
14.22. propstat XML Element . . . . . . . . . . . . . . . . . . 94 14.22. propstat XML Element ....................................87
14.23. remove XML Element . . . . . . . . . . . . . . . . . . . 95 14.23. remove XML Element ......................................87
14.24. response XML Element . . . . . . . . . . . . . . . . . . 95 14.24. response XML Element ....................................88
14.25. responsedescription XML Element . . . . . . . . . . . . 96 14.25. responsedescription XML Element .........................88
14.26. set XML Element . . . . . . . . . . . . . . . . . . . . 96 14.26. set XML Element .........................................88
14.27. shared XML Element . . . . . . . . . . . . . . . . . . . 96 14.27. shared XML Element ......................................89
14.28. status XML Element . . . . . . . . . . . . . . . . . . . 96 14.28. status XML Element ......................................89
14.29. timeout XML Element . . . . . . . . . . . . . . . . . . 97 14.29. timeout XML Element .....................................89
14.30. write XML Element . . . . . . . . . . . . . . . . . . . 97 14.30. write XML Element .......................................89
15. DAV Properties . . . . . . . . . . . . . . . . . . . . . . . 98 15. DAV Properties ................................................90
15.1. creationdate Property . . . . . . . . . . . . . . . . . 98 16. Precondition/Postcondition XML Elements .......................98
15.2. displayname Property . . . . . . . . . . . . . . . . . . 99 17. XML Extensibility in DAV .....................................101
15.3. getcontentlanguage Property . . . . . . . . . . . . . . 99 18. DAV Compliance Classes .......................................103
15.4. getcontentlength Property . . . . . . . . . . . . . . . 100 18.1. Class 1 .................................................103
15.5. getcontenttype Property . . . . . . . . . . . . . . . . 100 18.2. Class 2 .................................................103
15.6. getetag Property . . . . . . . . . . . . . . . . . . . . 101 18.3. Class 3 .................................................103
15.7. getlastmodified Property . . . . . . . . . . . . . . . . 101 19. Internationalization Considerations ..........................104
15.8. lockdiscovery Property . . . . . . . . . . . . . . . . . 102 20. Security Considerations ......................................105
15.8.1. Example - Retrieving DAV:lockdiscovery . . . . . . . 103 20.1. Authentication of Clients ...............................105
15.9. resourcetype Property . . . . . . . . . . . . . . . . . 104 20.2. Denial of Service .......................................106
15.10. supportedlock Property . . . . . . . . . . . . . . . . . 105 20.3. Security through Obscurity ..............................106
15.10.1. Example - Retrieving DAV:supportedlock . . . . . . . 106 20.4. Privacy Issues Connected to Locks .......................106
16. Precondition/Postcondition XML Elements . . . . . . . . . . . 107 20.5. Privacy Issues Connected to Properties ..................107
17. XML Extensibility in DAV . . . . . . . . . . . . . . . . . . 111 20.6. Implications of XML Entities ............................107
18. DAV Compliance Classes . . . . . . . . . . . . . . . . . . . 113 20.7. Risks Connected with Lock Tokens ........................108
18.1. Class 1 . . . . . . . . . . . . . . . . . . . . . . . . 113 20.8. Hosting Malicious Content ...............................108
18.2. Class 2 . . . . . . . . . . . . . . . . . . . . . . . . 113 21. IANA Considerations ..........................................109
18.3. Class 3 . . . . . . . . . . . . . . . . . . . . . . . . 113 21.1. New URI Schemes .........................................109
19. Internationalization Considerations . . . . . . . . . . . . . 115 21.2. XML Namespaces ..........................................109
20. Security Considerations . . . . . . . . . . . . . . . . . . . 117 21.3. Message Header Fields ...................................109
20.1. Authentication of Clients . . . . . . . . . . . . . . . 117 21.3.1. DAV ..............................................109
20.2. Denial of Service . . . . . . . . . . . . . . . . . . . 117 21.3.2. Depth ............................................110
20.3. Security through Obscurity . . . . . . . . . . . . . . . 118 21.3.3. Destination ......................................110
20.4. Privacy Issues Connected to Locks . . . . . . . . . . . 118 21.3.4. If ...............................................110
20.5. Privacy Issues Connected to Properties . . . . . . . . . 118 21.3.5. Lock-Token .......................................110
20.6. Implications of XML Entities . . . . . . . . . . . . . . 119 21.3.6. Overwrite ........................................111
20.7. Risks Connected with Lock Tokens . . . . . . . . . . . . 119 21.3.7. Timeout ..........................................111
20.8. Hosting Malicious Content . . . . . . . . . . . . . . . 120 21.4. HTTP Status Codes .......................................111
21. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 121 22. Acknowledgements .............................................112
21.1. New URI Schemes . . . . . . . . . . . . . . . . . . . . 121 23. Contributors to This Specification ...........................113
21.2. XML Namespaces . . . . . . . . . . . . . . . . . . . . . 121 24. Authors of RFC 2518 ..........................................113
21.3. Message Header Fields . . . . . . . . . . . . . . . . . 121 25. References ...................................................114
21.3.1. DAV . . . . . . . . . . . . . . . . . . . . . . . . 121 25.1. Normative References.....................................114
21.3.2. Depth . . . . . . . . . . . . . . . . . . . . . . . 121 25.2. Informative References ..................................115
21.3.3. Destination . . . . . . . . . . . . . . . . . . . . 122 Appendix A. Notes on Processing XML Elements ....................117
21.3.4. If . . . . . . . . . . . . . . . . . . . . . . . . . 122 A.1. Notes on Empty XML Elements ..............................117
21.3.5. Lock-Token . . . . . . . . . . . . . . . . . . . . . 122 A.2. Notes on Illegal XML Processing ..........................117
21.3.6. Overwrite . . . . . . . . . . . . . . . . . . . . . 122 A.3. Example - XML Syntax Error ...............................117
21.3.7. Timeout . . . . . . . . . . . . . . . . . . . . . . 123 A.4. Example - Unexpected XML Element .........................118
22. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 124 Appendix B. Notes on HTTP Client Compatibility ...................119
23. Contributors to This Specification . . . . . . . . . . . . . 126 Appendix C. The 'opaquelocktoken' Scheme and URIs ................120
24. Authors of RFC2518 . . . . . . . . . . . . . . . . . . . . . 127 Appendix D. Lock-null Resources ..................................120
25. References . . . . . . . . . . . . . . . . . . . . . . . . . 128 D.1. Guidance for Clients Using LOCK to Create Resources ......121
25.1. Normative References . . . . . . . . . . . . . . . . . . 128 Appendix E. Guidance for Clients Desiring to Authenticate ........121
25.2. Informational References . . . . . . . . . . . . . . . . 129 Appendix F. Summary of Changes from RFC 2518 .....................123
Appendix A. Notes on Processing XML Elements . . . . . . . . . . 130 F.1. Changes for Both Client and Server Implementations .......123
A.1. Notes on Empty XML Elements . . . . . . . . . . . . . . 130 F.2. Changes for Server Implementations .......................125
A.2. Notes on Illegal XML Processing . . . . . . . . . . . . 130 F.3. Other Changes ............................................126
A.3. Example - XML Syntax Error . . . . . . . . . . . . . . . 130
A.4. Example - Unexpected XML Element . . . . . . . . . . . . 131
Appendix B. Notes on HTTP Client Compatibility . . . . . . . . . 132
Appendix C. The 'opaquelocktoken' Scheme and URIs . . . . . . . 133
Appendix D. Lock-null Resources . . . . . . . . . . . . . . . . 134
D.1. Guidance for Clients Using LOCK to Create Resources . . 134
Appendix E. Guidance for Clients Desiring to Authenticate . . . 136
Appendix F. Summary of changes from RFC2518 . . . . . . . . . . 138
F.1. Changes for both Client and Server Implementations . . . 138
F.2. Changes for Server Implementations . . . . . . . . . . . 139
F.3. Other Changes . . . . . . . . . . . . . . . . . . . . . 140
Appendix G. Change Log (to be removed by RFC Editor before
publication) . . . . . . . . . . . . . . . . . . . . 142
G.1. Changes from -05 to -06 . . . . . . . . . . . . . . . . 142
G.2. Changes in -07 . . . . . . . . . . . . . . . . . . . . . 142
G.3. Changes in -08 . . . . . . . . . . . . . . . . . . . . . 143
G.4. Changes in -09 . . . . . . . . . . . . . . . . . . . . . 144
G.5. Changes in -10 . . . . . . . . . . . . . . . . . . . . . 145
G.6. Changes in -11 . . . . . . . . . . . . . . . . . . . . . 145
G.7. Changes in -12 . . . . . . . . . . . . . . . . . . . . . 145
G.8. Changes in -13 . . . . . . . . . . . . . . . . . . . . . 146
G.9. Changes in -14 . . . . . . . . . . . . . . . . . . . . . 146
G.10. Changes in -15 . . . . . . . . . . . . . . . . . . . . . 146
G.11. Changes in -16 . . . . . . . . . . . . . . . . . . . . . 146
G.12. Changes in -17 . . . . . . . . . . . . . . . . . . . . . 147
G.13. Changes in -18 . . . . . . . . . . . . . . . . . . . . . 147
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 148
Intellectual Property and Copyright Statements . . . . . . . . . 149
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. about Web pages, such as their authors, creation dates, etc.
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 mapping from URLs to move Web resources, operations that change the mapping from URLs to
resources. 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 document 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 extra HTTP headers (Section 10) used with methods (Section 9) and the extra HTTP headers (Section 10) used with
WebDAV methods. General considerations for handling HTTP requests WebDAV methods. General considerations for handling HTTP requests
and responses in WebDAV are found in Section 8. 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 extra status codes developed for WebDAV This specification defines extra 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
and postcondition (Section 16) XML elements in error response bodies. and postcondition (Section 16) XML elements in error response bodies.
WebDAV uses XML ([REC-XML]) for property names and some values, and WebDAV uses XML ([REC-XML]) for property names and some values, and
also uses XML to marshal complicated requests and responses. This also uses XML to marshal complicated requests and responses. This
specification contains DTD and text definitions of all all properties specification contains DTD and text definitions of all properties
(Section 15) and all other XML elements (Section 14) used in (Section 15) and all other XML elements (Section 14) used in
marshalling. WebDAV includes a few special rules on extending marshalling. WebDAV includes a few special rules on extending WebDAV
WebDAV XML marshalling in backwards-compatible ways (Section 17). XML marshalling in backwards-compatible ways (Section 17).
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 whitespace. 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. Note this
is not the standard BNF syntax used in other RFCs.
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.
3. Terminology 3. Terminology
skipping to change at page 12, line 6 skipping to change at page 9, line 42
Live Property - A property whose semantics and syntax are enforced by Live Property - A property whose semantics and syntax are enforced by
the server. For example, the live property DAV:getcontentlength has the server. For example, the live property DAV:getcontentlength has
its value, the length of the entity returned by a GET request, its value, the length of the entity returned by a GET request,
automatically calculated by the server. automatically calculated by the server.
Dead Property - A property whose semantics and syntax are not Dead Property - A property whose semantics and syntax are not
enforced by the server. The server only records the value of a dead enforced by the server. The server only records the value of a dead
property; the client is responsible for maintaining the consistency property; the client is responsible for maintaining the consistency
of the syntax and semantics of a dead property. of the syntax and semantics of a dead property.
Principal - A "principal" is a distinct human or computational actor Principal - A distinct human or computational actor that initiates
that initiates access to network resources. access to network resources.
State Token - A URI which represents a state of a resource. Lock State Token - A URI that represents a state of a resource. Lock
tokens are the only state tokens defined in this specification. tokens are the only state tokens defined in this specification.
4. Data Model for Resource Properties 4. Data Model for Resource Properties
4.1. The Resource Property Model 4.1. The Resource Property Model
Properties are pieces of data that describe the state of a resource. Properties are pieces of data that describe the state of a resource.
Properties are data about data. Properties are data about data.
Properties are used in distributed authoring environments to provide Properties are used in distributed authoring environments to provide
skipping to change at page 13, line 25 skipping to change at page 10, line 25
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 properties include cases where a) the value of a property is
protected, maintained by the server, and b) the value of the property protected and maintained by the server, and b) the value of the
is maintained by the client, but the server performs syntax checking property is maintained by the client, but the server performs syntax
on submitted values. All instances of a given live property MUST checking on submitted values. All instances of a given live property
comply with the definition associated with that property name. A MUST comply with the definition associated with that property name.
dead property has its syntax and semantics enforced by the client; A dead property has its syntax and semantics enforced by the client;
the 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
large number of properties are needed to describe the state of a relatively large number of properties are needed to describe the
resource, and setting/returning them all through HTTP headers is state of a resource, and setting/returning them all through HTTP
inefficient. Thus a mechanism is needed which allows a principal to headers is inefficient. Thus, a mechanism is needed that allows a
identify a set of properties in which the principal is interested and principal to identify a set of properties in which the principal is
to set or retrieve just those properties. interested and to set or retrieve just those properties.
4.3. Property Values 4.3. Property Values
The value of a property is always a (well-formed) XML fragment. The value of a property is always a (well-formed) XML fragment.
XML has been chosen because it is a flexible, self-describing, XML has been chosen because it is a flexible, self-describing,
structured data format that supports rich schema definitions, and structured data format that supports rich schema definitions, and
because of its support for multiple character sets. XML's self- because of its support for multiple character sets. XML's self-
describing nature allows any property's value to be extended by describing nature allows any property's value to be extended by
adding elements. Clients will not break when they encounter adding elements. Clients will not break when they encounter
skipping to change at page 14, line 14 skipping to change at page 11, line 14
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 an 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); a property does not have multiple values in different
value in multiple languages. languages or a single 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:
<R:title xmlns:R="http://www.example.com/ns/"></R:title> <R:title xmlns:R="http://www.example.com/ns/"></R:title>
The value of the property appears inside the property name element. The value of the property appears inside the property name element.
The value may be any kind of well-formed XML content, including both The value may be any kind of well-formed XML content, including both
skipping to change at page 15, line 27 skipping to change at page 12, line 28
Item in the value: Item in the value:
[prefix] [prefix]
XML Infoset attributes not listed above MAY be preserved by the XML Infoset attributes not listed above MAY be preserved by the
server, but clients MUST NOT rely on them being preserved. The above server, but clients MUST NOT rely on them being preserved. The above
rules would also apply by default to live properties, unless defined rules would also apply by default to live properties, unless defined
otherwise. otherwise.
Servers MUST ignore the XML attribute xml:space if present and never Servers MUST ignore the XML attribute xml:space if present and never
use it to change white space handling. White space in property use it to change whitespace handling. Whitespace in property values
values is significant. is significant.
4.3.1. Example - Property with Mixed Content 4.3.1. Example - Property with Mixed Content
Consider a dead property 'author' created by the client as follows: Consider a dead property 'author' created by the client as follows:
<D:prop xml:lang="en" xmlns:D="DAV:"> <D:prop xml:lang="en" xmlns:D="DAV:">
<x:author xmlns:x='http://example.com/ns'> <x:author xmlns:x='http://example.com/ns'>
<x:name>Jane Doe</x:name> <x:name>Jane Doe</x:name>
<!-- Jane's contact info --> <!-- Jane's contact info -->
<x:uri type='email' <x:uri type='email'
skipping to change at page 16, line 25 skipping to change at page 13, line 26
<x:notes> <x:notes>
Jane has been working way <h:em>too</h:em> long on the Jane has been working way <h:em>too</h:em> long on the
long-awaited revision of &lt;RFC2518&gt;. long-awaited revision of &lt;RFC2518&gt;.
</x:notes> </x:notes>
</author> </author>
</D:prop> </D:prop>
Note in this example: Note in this example:
o The [prefix] for the property name itself was not preserved, being o The [prefix] for the property name itself was not preserved, being
non-significant, all other [prefix] values have been preserved, non-significant, whereas all other [prefix] values have been
preserved,
o attribute values have been rewritten with double quotes instead of o attribute values have been rewritten with double quotes instead of
single quotes (quoting style is not significant), and attribute single quotes (quoting style is not significant), and attribute
order has not been preserved, order has not been preserved,
o the xml:lang attribute has been returned on the property name o the xml:lang attribute has been returned on the property name
element itself (it was in scope when the property was set, but the element itself (it was in scope when the property was set, but the
exact position in the response is not considered significant as exact position in the response is not considered significant as
long as it is in scope), long as it is in scope),
o whitespace between tags has been preserved everywhere (whitespace o whitespace between tags has been preserved everywhere (whitespace
between attributes not so), between attributes not so),
o CDATA encapsulation was replaced with character escaping (the o CDATA encapsulation was replaced with character escaping (the
reverse would also be legal), reverse would also be legal),
o the comment item was stripped (as would have been a processing o the comment item was stripped (as would have been a processing
instruction item). instruction item).
Implementation note: there are cases such as editing scenarios where Implementation note: there are cases such as editing scenarios where
clients may require that XML content is preserved character-by- clients may require that XML content is preserved character by
character (such as attribute ordering or quoting style). In this character (such as attribute ordering or quoting style). In this
case, clients should consider using a text-only property value by case, clients should consider using a text-only property value by
escaping all characters that have a special meaning in XML parsing. escaping all characters that have a special meaning in XML parsing.
4.4. Property Names 4.4. Property Names
A property name is a universally unique identifier that is associated A property name is a universally unique identifier that is associated
with a schema that provides information about the syntax and with a schema that provides information about the syntax and
semantics of the property. semantics of the property.
skipping to change at page 17, line 25 skipping to change at page 14, line 25
implementation of the live property is faithful to its definition. implementation of the live property is faithful to its definition.
The XML namespace mechanism, which is based on URIs ([RFC3986]), is The XML namespace mechanism, which is based on URIs ([RFC3986]), is
used to name properties because it prevents namespace collisions and used to name properties because it prevents namespace collisions and
provides for varying degrees of administrative control. provides for varying degrees of administrative control.
The property namespace is flat; that is, no hierarchy of properties The property namespace is flat; that is, no hierarchy of properties
is explicitly recognized. Thus, if a property A and a property A/B is explicitly recognized. Thus, if a property A and a property A/B
exist on a resource, there is no recognition of any relationship exist on a resource, there is no recognition of any relationship
between the two properties. It is expected that a separate between the two properties. It is expected that a separate
specification will eventually be produced which will address issues specification will eventually be produced that will address issues
relating to hierarchical properties. relating to hierarchical properties.
Finally, it is not possible to define the same property twice on a Finally, it is not possible to define the same property twice on a
single resource, as this would cause a collision in the resource's single resource, as this would cause a collision in the resource's
property namespace. property namespace.
4.5. Source Resources and Output Resources 4.5. Source Resources and Output Resources
Some HTTP resources are dynamically generated by the server. For Some HTTP resources are dynamically generated by the server. For
these resources, there presumably exists source code somewhere these resources, there presumably exists source code somewhere
governing how that resource is generated. The relationship of source governing how that resource is generated. The relationship of source
files to output HTTP resources may be one to one, one to many, many files to output HTTP resources may be one to one, one to many, many
to one or many to many. There is no mechanism in HTTP to determine to one, or many to many. There is no mechanism in HTTP to determine
whether a resource is even dynamic, let alone where its source files whether a resource is even dynamic, let alone where its source files
exist or how to author them. Although this problem would usefully be exist or how to author them. Although this problem would usefully be
solved, interoperable WebDAV implementations have been widely solved, interoperable WebDAV implementations have been widely
deployed without actually solving this problem, by dealing only with deployed without actually solving this problem, by dealing only with
static resources. Thus, the source vs. output problem is not solved static resources. Thus, the source vs. output problem is not solved
in this specification and has been deferred to a separate document. in this specification and has been deferred to a separate document.
5. Collections of Web Resources 5. Collections of Web Resources
This section provides a description of a type of Web resource, the This section provides a description of a type of Web resource, the
collection, and discusses its interactions with the HTTP URL collection, and discusses its interactions with the HTTP URL
namespace and with HTTP methods. The purpose of a collection namespace and with HTTP methods. The purpose of a collection
resource is to model collection-like objects (e.g., file system resource is to model collection-like objects (e.g., file system
directories) within a server's namespace. directories) within a server's namespace.
All DAV compliant resources MUST support the HTTP URL namespace model All DAV-compliant resources MUST support the HTTP URL namespace model
specified herein. specified herein.
5.1. HTTP URL Namespace Model 5.1. HTTP URL Namespace Model
The HTTP URL namespace is a hierarchical namespace where the The HTTP URL namespace is a hierarchical namespace where the
hierarchy is delimited with the "/" character. hierarchy is delimited with the "/" character.
An HTTP URL namespace is said to be consistent if it meets the An HTTP URL namespace is said to be consistent if it meets the
following conditions: for every URL in the HTTP hierarchy there following conditions: for every URL in the HTTP hierarchy there
exists a collection that contains that URL as an internal member URL. 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 requires 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.
As is 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. Some HTTP methods apply only to a collection, but act as containers. Some HTTP methods apply only to a collection, but
some apply to some or all of the resources inside the container some apply to some or all of the resources inside the container
defined by the collection. When the scope of a method is not clear, defined by the collection. When the scope of a method is not clear,
the client can specify what depth to apply. Depth can be either zero the client can specify what depth to apply. Depth can be either zero
levels in (only the collection), one level (the collection and levels (only the collection), one level (the collection and directly
directly contained resources) or infinite levels (the collection and contained resources), or infinite levels (the collection and all
all contained resources recursively). contained resources recursively).
A collection's state consists of at least a set of mappings between A collection's state consists of at least a set of mappings between
path segments and resources, and a set of properties on the path segments and resources, and a set of properties on the
collection itself. In this document, a resource B will be said to be collection itself. In this document, a resource B will be said to be
contained in the collection resource A if there is a path segment 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 mapping that maps to B and that is contained in A. A collection MUST
MUST contain at most one mapping for a given path segment, i.e., it contain at most one mapping for a given path segment, i.e., it is
is illegal to have the same path segment mapped to more than one illegal to have the same path segment mapped to more than one
resource. resource.
Properties defined on collections behave exactly as do properties on Properties defined on collections behave exactly as do properties on
non-collection resources. A collection MAY have additional state non-collection resources. A collection MAY have additional state
such as entity bodies returned by GET. such as entity bodies returned by GET.
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 compliant, then resource A must be a collection and must contain
exactly one mapping from "blah" to B. exactly one mapping from "blah" to B.
Although commonly a mapping consists of a single segment and a 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, in general, a mapping consists of a set of segments and a
resource. This allows a server to treat a set of segments as 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 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 resource, or none of the segments are mapped to a resource). For
example, a server that performs case-folding on segments will treat example, a server that performs case-folding on segments will treat
the segments "ab", "Ab", "aB", and "AB" as equivalent. A client can 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 then use any of these segments to identify the resource. Note that a
PROPFIND result will select one of these equivalent segments to PROPFIND result will select one of these equivalent segments to
identify the mapping, so there will be one PROPFIND response element identify the mapping, so there will be one PROPFIND response element
per mapping, not one per segment in the mapping. 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 internal If a WebDAV-compliant resource has no WebDAV-compliant internal
members in the HTTP URL namespace hierarchy then the WebDAV compliant members in the HTTP URL namespace hierarchy, then the WebDAV-
resource is not required to be a collection. compliant 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
referring to a collection, the server SHOULD include the trailing referring to a collection, the server SHOULD include the trailing
slash. In general clients SHOULD use the trailing slash form of slash. In general, clients SHOULD use the trailing slash form of
collection names. If clients do not use the trailing slash form the collection names. If clients do not use the trailing slash form the
client needs to be prepared to see a redirect response. Clients will client needs to be prepared to see a redirect response. Clients will
find the DAV:resourcetype property more reliable than the URL to find find the DAV:resourcetype property more reliable than the URL to find
out if a resource is a collection. out if a resource is a collection.
Clients MUST be able to support the case where WebDAV resources are Clients MUST be able to support the case where WebDAV resources are
contained inside non-WebDAV resources. For example, if a OPTIONS contained inside non-WebDAV resources. For example, if an OPTIONS
response from "http://example.com/servlet/dav/collection" indicates response from "http://example.com/servlet/dav/collection" indicates
WebDAV support, the client cannot assume that WebDAV support, the client cannot assume that
"http://example.com/servlet/dav/" or its parent necessarily are "http://example.com/servlet/dav/" or its parent necessarily are
WebDAV collections. WebDAV collections.
A typical scenario in which mapped URLs do not appear as members of A typical scenario in which mapped URLs do not appear as members of
their parent collection is the case where a server allows links or their parent collection is the case where a server allows links or
redirects to non-WebDAV resources. For instance, "/col/link" might redirects to non-WebDAV resources. For instance, "/col/link" might
not appear as a member of "/col/", although the server would respond not appear as a member of "/col/", although the server would respond
with a 302 status to a GET request to "/col/link", thus the URL with a 302 status to a GET request to "/col/link"; thus, the URL
"/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" is
reported upon listing the members of "/col". In cases where a server reported upon listing the members of "/col". In cases where a server
treats a set of segments as equivalent, the server MUST expose only treats a set of segments as equivalent, the server MUST expose only
one preferred segment per mapping, consistently chosen, in PROPFIND one preferred segment per mapping, consistently chosen, in PROPFIND
responses. 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
skipping to change at page 21, line 44 skipping to change at page 18, line 29
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 a depth-infinity lock L, all 4. For a collection that is locked with a depth-infinity lock L, all
member resources are indirectly locked. Changes in membership of member resources are indirectly locked. Changes in membership of
a such a collection affect the set of indirectly locked such a collection affect the set of indirectly locked resources:
resources:
* If a member resource is added to the collection, the new * If a member resource is added to the collection, the new
member resource MUST NOT already have a conflicting lock, member resource MUST NOT already have a conflicting lock,
because the new resource MUST become indirectly locked by L. because the new resource MUST become indirectly locked by L.
* If a member resource stops being a member of the collection, * If a member resource stops being a member of the collection,
then the resource MUST no longer be indirectly locked by L. then the resource MUST no longer be indirectly locked by L.
5. Each lock is identified by a single globally unique lock token 5. Each lock is identified by a single globally 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 7. A lock token is "submitted" in a request when it appears in an
"If" header (the Write Lock (Section 7) section discusses when "If" header (Section 7, "Write Lock", discusses when token
token submission is required for write locks). submission is required for write locks).
8. If a request causes the lock-root of any lock to become an 8. If a request causes the lock-root of any lock to become an
unmapped URL, then the lock MUST also be deleted by that request. unmapped URL, then the lock MUST also be deleted by that request.
6.2. Exclusive Vs. Shared Locks 6.2. Exclusive vs. Shared Locks
The most basic form of lock is an exclusive lock. Exclusive locks The most basic form of lock is an exclusive lock. Exclusive locks
avoid having to deal with content change conflicts, without requiring avoid having to deal with content change conflicts, without requiring
any coordination other than the methods described in this any coordination other than the methods described in this
specification. specification.
However, there are times when the goal of a lock is not to exclude However, there are times when the goal of a lock is not to exclude
others from exercising an access right but rather to provide a others from exercising an access right but rather to provide a
mechanism for principals to indicate that they intend to exercise mechanism for principals to indicate that they intend to exercise
their access rights. Shared locks are provided for this case. A their access rights. Shared locks are provided for this case. A
shared lock allows multiple principals to receive a lock. Hence any shared lock allows multiple principals to receive a lock. Hence any
principal that has both access privileges and a valid lock can use principal that has both access privileges and a valid lock can use
the locked resource. the locked resource.
With shared locks there are two trust sets that affect a resource. With shared locks, there are two trust sets that affect a resource.
The first trust set is created by access permissions. Principals who The first trust set is created by access permissions. Principals who
are trusted, for example, may have permission to write to the are trusted, for example, may have permission to write to the
resource. Among those who have access permission to write to the resource. Among those who have access permission to write to the
resource, the set of principals who have taken out a shared lock also resource, the set of principals who have taken out a shared lock also
must trust each other, creating a (typically) smaller trust set must trust each other, creating a (typically) smaller trust set
within the access permission write set. within the access permission write set.
Starting with every possible principal on the Internet, in most Starting with every possible principal on the Internet, in most
situations the vast majority of these principals will not have write situations the vast majority of these principals will not have write
access to a given resource. Of the small number who do have write access to a given resource. Of the small number who do have write
access, some principals may decide to guarantee their edits are free access, some principals may decide to guarantee their edits are free
from overwrite conflicts by using exclusive write locks. Others may from overwrite conflicts by using exclusive write locks. Others may
decide they trust their collaborators will not overwrite their work decide they trust their collaborators will not overwrite their work
(the potential set of collaborators being the set of principals who (the potential set of collaborators being the set of principals who
have write permission) and use a shared lock, which informs their have write permission) and use a shared lock, which informs their
collaborators that a principal may be working on the resource. collaborators that a principal may be working on the resource.
The WebDAV extensions to HTTP do not need to provide all of the The WebDAV extensions to HTTP do not need to provide all of the
communications paths necessary for principals to coordinate their communications paths necessary for principals to coordinate their
activities. When using shared locks, principals may use any out of activities. When using shared locks, principals may use any out-of-
band communication channel to coordinate their work (e.g., face-to- band communication channel to coordinate their work (e.g., face-to-
face interaction, written notes, post-it notes on the screen, face interaction, written notes, post-it notes on the screen,
telephone conversation, email, etc.) The intent of a shared lock is telephone conversation, email, etc.) The intent of a shared lock is
to let collaborators know who else may be working on a resource. to let collaborators know who else may be working on a resource.
Shared locks are included because experience from web distributed Shared locks are included because experience from Web-distributed
authoring systems has indicated that exclusive locks are often too authoring systems has indicated that exclusive locks are often too
rigid. An exclusive lock is used to enforce a particular editing rigid. An exclusive lock is used to enforce a particular editing
process: take out an exclusive lock, read the resource, perform process: take out an exclusive lock, read the resource, perform
edits, write the resource, release the lock. This editing process edits, write the resource, release the lock. This editing process
has the problem that locks are not always properly released, for has the problem that locks are not always properly released, for
example when a program crashes, or when a lock creator leaves without example, when a program crashes or when a lock creator leaves without
unlocking a resource. While both timeouts (Section 6.6) and unlocking a resource. While both timeouts (Section 6.6) and
administrative action can be used to remove an offending lock, administrative action can be used to remove an offending lock,
neither mechanism may be available when needed; the timeout may be neither mechanism may be available when needed; the timeout may be
long or the administrator may not be available. long or the administrator may not be available.
A successful request for a new shared lock MUST result in the A successful request for a new shared lock MUST result in the
generation of a unique lock associated with the requesting principal. generation of a unique lock associated with the requesting principal.
Thus if five principals have taken out shared write locks on the same Thus, if five principals have taken out shared write locks on the
resource there will be five locks and five lock tokens, one for each same resource, there will be five locks and five lock tokens, one for
principal. each principal.
6.3. Required Support 6.3. Required Support
A WebDAV compliant resource is not required to support locking in any A WebDAV-compliant resource is not required to support locking in any
form. If the resource does support locking it may choose to support form. If the resource does support locking, it may choose to support
any combination of exclusive and shared locks for any access types. any combination of exclusive and shared locks for any access types.
The reason for this flexibility is that locking policy strikes to the The reason for this flexibility is that locking policy strikes to the
very heart of the resource management and versioning systems employed very heart of the resource management and versioning systems employed
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 lock to The creator of a lock has special privileges to use the lock to
modify the resource. When a locked resource is modified, a server modify the resource. When a locked resource is modified, a server
MUST check that the authenticated principal matches the lock creator MUST check that the authenticated principal matches the lock creator
(in addition to checking for valid lock token submission). (in addition to checking for valid lock token submission).
skipping to change at page 24, line 18 skipping to change at page 21, line 7
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.
6.5. Lock Tokens 6.5. Lock Tokens
A lock token is a type of state token which identifies a particular A lock token is a type of state token that identifies a particular
lock. Each lock has exactly one unique lock token generated by the lock. Each lock has exactly one unique lock token generated by the
server. Clients MUST NOT attempt to interpret lock tokens in any server. Clients MUST NOT attempt to interpret lock tokens in any
way. way.
Lock token URIs MUST be unique across all resources for all time. Lock token URIs MUST be unique across all resources for all time.
This uniqueness constraint allows lock tokens to be submitted across This uniqueness constraint allows lock tokens to be submitted across
resources and servers without fear of confusion. Since lock tokens resources and servers without fear of confusion. Since lock tokens
are unique, a client MAY submit a lock token in an If header on a are unique, a client MAY submit a lock token in an If header on a
resource other than the one that returned it. resource other than the one that returned it.
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
token 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 Universally Unique
tokens, and to use the URI form defined by "A Universally Unique Identifiers (UUIDs) for lock tokens, and to use the URI form defined
Identifier (UUID) URN Namespace" ([RFC4122]). However servers are by "A Universally Unique Identifier (UUID) URN Namespace"
free to use any URI (e.g. from another scheme) so long as it meets ([RFC4122]). However, servers are free to use any URI (e.g., from
the uniqueness requirements. For example, a valid lock token might another scheme) so long as it meets the uniqueness requirements. For
be constructed using the "opaquelocktoken" scheme defined in example, a valid lock token might be constructed using the
Appendix C. "opaquelocktoken" scheme defined in Appendix C.
Example: "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6" Example: "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6"
6.6. Lock Timeout 6.6. Lock Timeout
A lock MAY have a limited lifetime. The lifetime is suggested by the A lock MAY have a limited lifetime. The lifetime is suggested by the
client when creating or refreshing the lock, but the server client when creating or refreshing the lock, but the server
ultimately chooses the timeout value. Timeout is measured in seconds ultimately chooses the timeout value. Timeout is measured in seconds
remaining until lock expiration. remaining until lock expiration.
The timeout counter MUST be restarted if a refresh lock request is The timeout counter MUST be restarted if a refresh lock request is
successful (see Section 9.10.2). The timeout counter SHOULD NOT be successful (see Section 9.10.2). The timeout counter SHOULD NOT be
restarted at any other time. restarted at any other time.
If the timeout expires then the lock SHOULD be removed. In this case If the timeout expires, then the lock SHOULD be removed. In this
the server SHOULD act as if an UNLOCK method was executed by the case the server SHOULD act as if an UNLOCK method was executed by the
server on the resource using the lock token of the timed-out lock, server on the resource using the lock token of the timed-out lock,
performed with its override authority. performed with its override authority.
Servers are advised to pay close attention to the values submitted by Servers are advised to pay close attention to the values submitted by
clients, as they will be indicative of the type of activity the clients, as they will be indicative of the type of activity the
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 offline.
A client MUST NOT assume that just because the time-out has expired A client MUST NOT assume that just because the timeout has expired,
the lock has immediately been removed. 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 timeout 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.
6.7. Lock Capability Discovery 6.7. Lock Capability Discovery
Since server lock support is optional, a client trying to lock a Since server lock support is optional, a client trying to lock a
resource on a server can either try the lock and hope for the best, resource on a server can either try the lock and hope for the best,
or perform some form of discovery to determine what lock capabilities or perform some form of discovery to determine what lock capabilities
the server supports. This is known as lock capability discovery. A the server supports. This is known as lock capability discovery. A
client can determine what lock types the server supports by client can determine what lock types the server supports by
retrieving the DAV:supportedlock property. retrieving the DAV:supportedlock property.
Any DAV compliant resource that supports the LOCK method MUST support Any DAV-compliant resource that supports the LOCK method MUST support
the DAV:supportedlock property. the DAV:supportedlock property.
6.8. Active Lock Discovery 6.8. Active Lock Discovery
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.
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 protects a resource: it prevents changes by An exclusive write lock protects a resource: it prevents changes by
any principal other than the lock creator and in any case where the any principal other than the lock creator and in any case where the
lock token is not submitted (e.g. by a client process other than the lock token is not submitted (e.g., by a client process other than 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 that 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,
* any dead property, * any dead property,
* any live property which is lockable (a live property is * any live property that is lockable (a live property is
lockable unless otherwise defined.) lockable unless otherwise defined.)
2. For collections, any modification of an internal member URI. An 2. For collections, any modification of an internal member URI. An
internal member URI of a collection is considered to be modified internal member URI of a collection is considered to be modified
if it is added, removed, or identifies a different resource. if it is added, removed, or identifies a different resource.
More discussion on write locks and collections is found in More discussion on write locks and collections is found in
Section 7.4. Section 7.4.
3. A modification of the mapping of the root of the write lock, 3. A modification of the mapping of the root of the write lock,
either to another resource or to no resource (e.g. DELETE). either to another resource or to no resource (e.g., DELETE).
Of the methods defined in HTTP and WebDAV, PUT, POST, PROPPATCH, Of the methods defined in HTTP and WebDAV, PUT, POST, PROPPATCH,
LOCK, UNLOCK, MOVE, COPY (for the destination resource), DELETE, and LOCK, UNLOCK, MOVE, COPY (for the destination resource), DELETE, and
MKCOL are affected by write locks. All other HTTP/WebDAV methods MKCOL are affected by write locks. All other HTTP/WebDAV methods
defined so far, GET in particular, function independently of a write defined so far -- GET in particular -- function independently of a
lock. write lock.
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 as lockable 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
skipping to change at page 28, line 18 skipping to change at page 24, line 23
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
client, and so does not know how to perform locking. client, and so does not know how to perform locking.
Client A doesn't lock the document, but does a GET and begins Client A doesn't lock the document, but does a GET, and begins
editing. editing.
Client B does LOCK, performs a GET and begins editing. Client B does LOCK, performs a GET and begins editing.
Client B finishes editing, performs a PUT, then an UNLOCK. Client B finishes editing, performs a PUT, then an UNLOCK.
Client A performs a PUT, overwriting and losing all of B's changes. Client A performs a PUT, overwriting and losing all of B's changes.
There are several reasons why the WebDAV protocol itself cannot There are several reasons why the WebDAV protocol itself cannot
prevent this situation. First, it cannot force all clients to use prevent this situation. First, it cannot force all clients to use
skipping to change at page 29, line 20 skipping to change at page 25, line 28
way is to use If-None-Match header specified in Section 14.26 of way is to use If-None-Match header specified in Section 14.26 of
[RFC2616]). It has the side benefit of locking the new resource [RFC2616]). It has the side benefit of locking the new resource
immediately for use of the 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 can 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 a locked (non-collection) resource with empty content. creation of a locked (non-collection) resource with empty content.
Subsequently, a successful PUT request (with the correct lock token) Subsequently, a successful PUT request (with the correct lock token)
provides the content for the resource. Note that the LOCK request provides the content for the resource. Note that the LOCK request
has no mechanism for the client to provide Content-Type or Content- has no mechanism for the client to provide Content-Type or Content-
Language, thus the server will use defaults or empty values and rely Language, thus the server will use defaults or empty values and rely
on the subsequent PUT request for correct values. on the subsequent PUT request for correct values.
A resource created with a LOCK is empty but otherwise behaves in A resource created with a LOCK is empty but otherwise behaves in
every way as a normal resource. It behaves the same way as a every way as a normal resource. It behaves the same way as a
resource created by a PUT request with an empty body (and where a resource created by a PUT request with an empty body (and where a
Content-Type and Content-Language was not specified), followed by 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, and copied, and in all ways behaves
regular non-collection resource. as a 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. that haven't been specified yet by the client.
o Can be updated (have content added) with a PUT request. o Can be updated (have content added) with a PUT request.
o MUST NOT be converted into a collection. The server MUST fail a o MUST NOT be converted into a collection. The server MUST fail a
MKCOL request (as it would with a MKCOL request to any existing MKCOL request (as it would with a MKCOL request to any existing
non-collection resource). non-collection resource).
o MUST have defined values for DAV:lockdiscovery and DAV: o MUST have defined values for DAV:lockdiscovery and DAV:
supportedlock properties. supportedlock properties.
skipping to change at page 30, line 35 skipping to change at page 26, line 43
7.4. Write Locks and Collections 7.4. Write Locks and Collections
There are two kinds of collection write locks. A depth-0 write lock There are two kinds of collection write locks. A depth-0 write lock
on a collection protects the collection properties plus the internal on a collection protects the collection properties plus the internal
member URLs of that one collection, while not protecting the content member URLs of that one collection, while not protecting the content
or properties of member resources (if the collection itself has any or properties of member resources (if the collection itself has any
entity bodies, those are also protected). A depth-infinity write entity bodies, those are also protected). A depth-infinity write
lock on a collection provides the same protection on that collection lock on a collection provides the same protection on that collection
and also provides write lock protection on every member resource. 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 of either kind protects any request
create a new resource in a write locked collection, any request that that would create a new resource in a write locked collection, any
would remove an internal member URL of a write locked collection, and request that would remove an internal member URL of a write locked
any request that would change the segment name of any internal collection, and any request that would change the segment name of any
member. 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 an internal member out of the collection, o MOVE an internal member out of the collection,
o MOVE an internal member into the collection, o MOVE an internal member into the collection,
o MOVE to rename an internal member within a collection, o MOVE to rename an internal member within a collection,
o COPY an internal member into a collection, and o COPY an internal member into a collection, and
o PUT or MKCOL request which would create a new internal member. o PUT or MKCOL request that 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 members of the locked collection. With a depth-infinity lock, all members of the locked collection. With a depth-infinity lock,
the resource identified by the root of the lock is directly locked, the resource identified by the root of the lock is directly locked,
and all its members 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 descendant 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 protected by the lock on the target indirectly locked but is now protected by the lock on the target
collection (the target collection's lock token will thereafter be collection (the target collection's lock token will 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 that 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 protected by the lock. For new resource MUST be automatically protected by the lock. For
example, if the collection /a/b/ is write locked and the resource /c example, if the collection /a/b/ is write locked and the resource /c
is moved to /a/b/c then resource /a/b/c will be added to the write is moved to /a/b/c, then resource /a/b/c will be added to the write
lock. lock.
7.5. Write Locks and the If Request Header 7.5. Write Locks and the If Request Header
A user agent has to demonstrate knowledge of a lock when requesting A user agent has to demonstrate knowledge of a lock when requesting
an operation on a locked resource. Otherwise, the following scenario an operation on a locked resource. Otherwise, the following scenario
might occur. In the scenario, program A, run by User A, takes out a might occur. In the scenario, program A, run by User A, takes out a
write lock on a resource. Program B, also run by User A, has no write lock on a resource. Program B, also run by User A, has no
knowledge of the lock taken out by program A, yet performs a PUT to knowledge of the lock taken out by program A, yet performs a PUT to
the locked resource. In this scenario, the PUT succeeds because the locked resource. In this scenario, the PUT succeeds because
locks are associated with a principal, not a program, and thus locks are associated with a principal, not a program, and thus
program B, because it is acting with principal A's credential, is program B, because it is acting with principal A's credential, is
allowed to perform the PUT. However, had program B known about the allowed to perform the PUT. However, had program B known about the
lock, it would not have overwritten the resource, preferring instead lock, it would not have overwritten the resource, preferring instead
to 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>
(<urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6>) (<urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6>)
>>Response >>Response
HTTP/1.1 204 No Content HTTP/1.1 204 No Content
In this example, even though both the source and destination are In this example, even though both the source and destination are
locked, only one lock token must be submitted, for the lock on the locked, only one lock token must be submitted (the one for the lock
destination. This is because the source resource is not modified by on the destination). This is because the source resource is not
a COPY, and hence unaffected by the write lock. In this example, modified by a COPY, and hence unaffected by the write lock. In this
user agent authentication has previously occurred via a mechanism example, user agent authentication has previously occurred via a
outside the scope of the HTTP protocol, in the underlying transport mechanism outside the scope of the HTTP protocol, in the underlying
layer. transport layer.
7.5.2. Example - Deleting a Member of a Locked Collection 7.5.2. Example - Deleting a Member of a Locked Collection
Consider a collection "/locked" with an exclusive, depth-infinity Consider a collection "/locked" with an exclusive, depth-infinity
write lock, and an attempt to delete an internal member "/locked/ write lock, and an attempt to delete an internal member "/locked/
member": member":
>>Request >>Request
DELETE /locked/member HTTP/1.1 DELETE /locked/member HTTP/1.1
skipping to change at page 33, line 17 skipping to change at page 29, line 29
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:error xmlns:D="DAV:"> <D:error xmlns:D="DAV:">
<D:lock-token-submitted> <D:lock-token-submitted>
<D:href>/locked/</D:href> <D:href>/locked/</D:href>
</D:lock-token-submitted> </D:lock-token-submitted>
</D:error> </D:error>
Thus the client would need to submit the lock token with the request Thus, the client would need to submit the lock token with the request
to make it succeed. To do that, various forms of the If header (see to make it succeed. To do that, various forms of the If header (see
Section 10.4) could be used. Section 10.4) could be used.
"No-Tag-List" format: "No-Tag-List" format:
If: (<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>) If: (<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>)
"Tagged-List" format, for "http://example.com/locked/": "Tagged-List" format, for "http://example.com/locked/":
If: <http://example.com/locked/> If: <http://example.com/locked/>
(<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>) (<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>)
"Tagged-List" format, for "http://example.com/locked/member": "Tagged-List" format, for "http://example.com/locked/member":
If: <http://example.com/locked/member> If: <http://example.com/locked/member>
(<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>) (<urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf>)
Note that for the purpose of submitting the lock token the actual Note that, for the purpose of submitting the lock token, the actual
form doesn't matter; what's relevant is that the lock token appears form doesn't matter; what's relevant is that the lock token appears
in the If header, and that the If header itself evaluates to true. in the If header, and that the If header itself evaluates to true.
7.6. Write Locks and COPY/MOVE 7.6. Write Locks and COPY/MOVE
A COPY method invocation MUST NOT duplicate any write locks active on A COPY method invocation MUST NOT duplicate any write locks active on
the source. However, as previously noted, if the COPY copies the the source. However, as previously noted, if the COPY copies the
resource into a collection that is locked with a depth-infinity lock, resource into a collection that is locked with a depth-infinity lock,
then the resource will be added to the lock. then the resource will be added to the lock.
A successful MOVE request on a write locked resource MUST NOT move A successful MOVE request on a write locked resource MUST NOT move
the write lock with the resource. However, if there is an existing the write lock with the resource. However, if there is an existing
lock at the destination, the server MUST add the moved resource to lock at the destination, the server MUST add the moved resource to
the destination lock scope. For example, if the MOVE makes the the destination lock scope. For example, if the MOVE makes the
resource a child of a collection that has a depth-infinity lock, then resource a child of a collection that has a depth-infinity lock, then
the resource will be added to that collection's lock. Additionally, the resource will be added to that collection's lock. Additionally,
if a resource with a depth-infinity lock is moved to a destination if a resource with a depth-infinity lock is moved to a destination
that is within the scope of the same lock (e.g., within the URL that is within the scope of the same lock (e.g., within the URL
namespace tree covered by the lock), the moved resource will again be namespace tree covered by the lock), the moved resource will again be
a added to the lock. In both these examples, as specified in added to the lock. In both these examples, as specified in
Section 7.5, an If header must be submitted containing a lock token Section 7.5, an If header must be submitted containing a lock token
for both the source and destination. 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 request with an If header but However, a client may submit a LOCK request with an If header but
without a body. A server receiving a LOCK request with no body MUST without a body. A server receiving a LOCK request with no body MUST
NOT create a new lock -- this form of the LOCK request is only to be NOT create a new lock -- this form of the LOCK request is only to be
used to "refresh" an existing lock (meaning, at minimum, that any used to "refresh" an existing lock (meaning, at minimum, that any
timers associated with the lock MUST be re-set). timers associated with the lock MUST be reset).
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.
If an error is received in response to a refresh LOCK request the If an error is received in response to a refresh LOCK request, the
client MUST NOT assume that the lock was refreshed. client MUST NOT assume that the lock was refreshed.
8. General Request and Response Handling 8. General Request and Response Handling
8.1. Precedence in Error Handling 8.1. Precedence in Error Handling
Servers MUST return authorization errors in preference to other Servers MUST return authorization errors in preference to other
errors. This avoids leaking information about protected resources errors. This avoids leaking information about protected resources
(e.g. a client that finds that a hidden resource exists by seeing a (e.g., a client that finds that a hidden resource exists by seeing a
423 Locked response to an anonymous request to the resource). 423 Locked response to an anonymous request to the resource).
8.2. Use of XML 8.2. Use of XML
In HTTP/1.1, method parameter information was exclusively encoded in In HTTP/1.1, method parameter information was exclusively encoded in
HTTP headers. Unlike HTTP/1.1, WebDAV encodes method parameter HTTP headers. Unlike HTTP/1.1, WebDAV encodes method parameter
information either in an XML ([REC-XML]) request entity body, or in information either in an XML ([REC-XML]) request entity body, or in
an HTTP header. The use of XML to encode method parameters was an HTTP header. The use of XML to encode method parameters was
motivated by the ability to add extra XML elements to existing motivated by the ability to add extra XML elements to existing
structures, providing extensibility; and by XML's ability to encode structures, providing extensibility; and by XML's ability to encode
skipping to change at page 35, line 35 skipping to change at page 31, line 35
In addition to encoding method parameters, XML is used in WebDAV to In addition to encoding method parameters, XML is used in WebDAV to
encode the responses from methods, providing the extensibility and encode the responses from methods, providing the extensibility and
internationalization advantages of XML for method output, as well as internationalization advantages of XML for method output, as well as
input. input.
When XML is used for a request or response body, the Content-Type When XML is used for a request or response body, the Content-Type
type SHOULD be application/xml. Implementations MUST accept both type SHOULD be application/xml. Implementations MUST accept both
text/xml and application/xml in request and response bodies. Use of text/xml and application/xml in request and response bodies. Use of
text/xml is deprecated. text/xml is deprecated.
All DAV compliant clients and resources MUST use XML parsers that are All DAV-compliant clients and resources MUST use XML parsers that are
compliant with [REC-XML] and [REC-XML-NAMES]. All XML used in either compliant with [REC-XML] and [REC-XML-NAMES]. All XML used in either
requests or responses MUST be, at minimum, well formed and use requests or responses MUST be, at minimum, well formed and use
namespaces correctly. If a server receives XML that is not well- namespaces correctly. If a server receives XML that is not well-
formed then the server MUST reject the entire request with a 400 (Bad formed, then the server MUST reject the entire request with a 400
Request). If a client receives XML that is not well-formed in a (Bad Request). If a client receives XML that is not well-formed in a
response then the client MUST NOT assume anything about the outcome response, then the client MUST NOT assume anything about the outcome
of the executed method and SHOULD treat the server as malfunctioning. of the executed method and SHOULD treat the server as malfunctioning.
Note that processing XML submitted by an untrusted source may cause Note that processing XML submitted by an untrusted source may cause
risks connected to privacy, security, and service quality (see risks connected to privacy, security, and service quality (see
Section 20). Servers MAY reject questionable requests (even though Section 20). Servers MAY reject questionable requests (even though
they consist of well-formed XML), for instance with a 400 (Bad they consist of well-formed XML), for instance, with a 400 (Bad
Request) status code and an optional response body explaining the Request) status code and an optional response body explaining the
problem. problem.
8.3. URL Handling 8.3. URL Handling
URLs appear in many places in requests and responses. URLs appear in many places in requests and responses.
Interoperability experience with [RFC2518] showed that many clients Interoperability experience with [RFC2518] showed that many clients
parsing Multi-Status responses did not fully implement the full parsing Multi-Status responses did not fully implement the full
Reference Resolution defined in Section 5 of [RFC3986]. Thus, Reference Resolution defined in Section 5 of [RFC3986]. Thus,
servers in particular need to be careful in handling URLs in servers in particular need to be careful in handling URLs in
skipping to change at page 36, line 28 skipping to change at page 32, 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]. Sections 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 37, line 25 skipping to change at page 33, line 28
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 the client extension) that the body could not be processed as the client
intended. 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
a distributed authoring environment, because ETags are necessary a distributed authoring environment, because ETags are necessary
along with locks to avoid the lost-update problem. A client might along with locks to avoid the lost-update problem. A client might
fail to renew a lock, for example when the lock times out and the fail to renew a lock, for example, when the lock times out and the
client is accidentally offline or in the middle of a long upload. client is accidentally offline or in the middle of a long upload.
When a client fails to renew the lock, it's quite possible the When a client fails to renew the lock, it's quite possible the
resource can still be relocked and the user can go on editing, as resource can still be relocked and the user can go on editing, as
long as no changes were made in the meantime. ETags are required for long as no changes were made in the meantime. ETags are required for
the client to be able to distinguish this case. Otherwise, the the client to be able to distinguish this case. Otherwise, the
client is forced to ask the user whether to overwrite the resource on client is forced to ask the user whether to overwrite the resource on
the server without even being able to tell the user whether it has the server without even being able to tell the user if it has
changed. Timestamps do not solve this problem nearly as well as changed. Timestamps do not solve this problem nearly as well as
ETags. ETags.
Strong ETags are much more useful for authoring use cases than weak Strong ETags are much more useful for authoring use cases than weak
ETags (see Section 13.3.3 of [RFC2616]). Semantic equivalence can be ETags (see Section 13.3.3 of [RFC2616]). Semantic equivalence can be
a useful concept but that depends on the document type and the a useful concept but that depends on the document type and the
application type, and interoperability might require some agreement application type, and interoperability might require some agreement
or standard outside the scope of this specification and HTTP. Note or standard outside the scope of this specification and HTTP. Note
also that weak ETags have certain restrictions in HTTP, e.g. these also that weak ETags have certain restrictions in HTTP, e.g., these
cannot be used in If-Match headers. 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 RFC 2616 (i.e., whether the
means that the resource is octet-for-octet equivalent to the body of ETag means that the resource is octet-for-octet equivalent to the
the PUT request, or whether the server could have made minor changes body of the PUT request, or whether the server could have made minor
in the formatting or content of the document upon storage). This is changes in the formatting or content of the document upon storage).
an HTTP issue, not purely a WebDAV issue. This is an HTTP issue, not purely a WebDAV issue.
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
skipping to change at page 38, line 47 skipping to change at page 34, line 50
code can mean many things (for example, 400 Bad Request can mean code can mean many things (for example, 400 Bad Request can mean
required headers are missing, headers are incorrectly formatted, or required headers are missing, headers are incorrectly formatted, or
much more). This error body mechanism is covered in Section 16. much more). This error body mechanism is 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:
o For any given URL, the "Last-Modified" value MUST increment every o For any given URL, the "Last-Modified" value MUST increment every
time the representation returned upon GET changes (within the time the representation returned upon GET changes (within the
limits of timestamp resolution). limits of timestamp resolution).
o For any given URL, an "ETag" value MUST NOT be re-used for o For any given URL, an "ETag" value MUST NOT be reused for
different representations returned by GET. different representations returned by GET.
In practice this means that servers In practice this means that servers
o might have to increment "Last-Modified" timestamps for every o might have to increment "Last-Modified" timestamps for every
resource inside the destination namespace of a namespace operation resource inside the destination namespace of a namespace operation
unless it can do so more selectively, and unless it can do so more selectively, and
o similarily, might have to re-assign "ETag" values for these o similarly, might have to re-assign "ETag" values for these
resources (unless the server allocates entity tags in a way so resources (unless the server allocates entity tags in a way so
that they are unique across the whole URL namespace managed by the that they are unique across the whole URL namespace managed by the
server). server).
Note that these considerations also apply to specific use cases, such Note that these considerations also apply to specific use cases, such
as using PUT to create a new resource at a URL that has been mapped as using PUT to create a new resource at a URL that has been mapped
before, but has been deleted since then. before, but has been deleted since then.
Finally, WebDAV properties (such as DAV:getetag and DAV: Finally, WebDAV properties (such as DAV:getetag and DAV:
getlastmodified) that inherit their semantics from HTTP headers must getlastmodified) that inherit their semantics from HTTP headers must
behave accordingly. behave accordingly.
9. HTTP Methods for Distributed Authoring 9. HTTP Methods for Distributed Authoring
9.1. PROPFIND Method 9.1. PROPFIND Method
The PROPFIND method retrieves properties defined on the resource The PROPFIND method retrieves properties defined on the resource
identified by the Request-URI, if the resource does not have any identified by the Request-URI, if the resource does not have any
internal members, or on the resource identified by the Request-URI internal members, or on the resource identified by the Request-URI
and potentially its member resources, if the resource is a collection and potentially its member resources, if the resource is a collection
that has internal member URLs. All DAV compliant resources MUST that has internal member URLs. All DAV-compliant resources MUST
support the PROPFIND method and the propfind XML element support the PROPFIND method and the propfind XML element
(Section 14.20) along with all XML elements defined for use with that (Section 14.20) along with all XML elements defined for use with that
element. element.
A client MUST submit a Depth header with a value of "0", "1", or A client MUST submit a Depth header with a value of "0", "1", or
"infinity" with a PROPFIND request. Servers MUST support "0" and "1" "infinity" with a PROPFIND request. Servers MUST support "0" and "1"
depth requests on WebDAV-compliant resources and SHOULD support depth requests on WebDAV-compliant resources and SHOULD support
"infinity" requests. In practice, support for infinite depth "infinity" requests. In practice, support for infinite-depth
requests MAY be disabled, due to the performance and security requests MAY be disabled, due to the performance and security
concerns associated with this behavior. Since clients weren't concerns associated with this behavior. Servers SHOULD treat a
required to include the Depth header in [RFC2518], servers SHOULD request without a Depth header as if a "Depth: infinity" header was
treat such a request as if a "Depth: infinity" header was included. included.
A client may submit a 'propfind' XML element in the body of the A client may submit a 'propfind' XML element in the body of the
request method describing what information is being requested. It is request method describing what information is being requested. It is
possible to: possible to:
o Request particular property values, by naming the properties o Request particular property values, by naming the properties
desired within the 'prop' element (the ordering of properties in desired within the 'prop' element (the ordering of properties in
here MAY be ignored by server), here MAY be ignored by the server),
o Request property values for those properties defined in this o Request property values for those properties defined in this
specification (at a minimum) plus dead properties, by using the specification (at a minimum) plus dead properties, by using the
'allprop' element (the 'include' element can be used with 'allprop' element (the 'include' element can be used with
'allprop' to instruct the server to also include additional live 'allprop' to instruct the server to also include additional live
properties that may not have been returned otherwise), properties that may not have been returned otherwise),
o Request a list of names of all the properties defined on the o Request a list of names of all the properties defined on the
resource, by using the 'propname' element. resource, by using the 'propname' element.
A client may choose not to submit a request body. An empty PROPFIND A client may choose not to submit a request body. An empty PROPFIND
request body MUST be treated as if it were an 'allprop' request. request body MUST be treated as if it were an 'allprop' request.
Note that 'allprop' does not return values for all live properties. Note that 'allprop' does not return values for all live properties.
WebDAV servers increasingly have expensively-calculated or lengthy WebDAV servers increasingly have expensively-calculated or lengthy
properties (see [RFC3253] and [RFC3744]) and do not return all properties (see [RFC3253] and [RFC3744]) and do not return all
properties already. Instead, WebDAV clients can use propname properties already. Instead, WebDAV clients can use propname
requests to discover what live properties exist, and request named requests to discover what live properties exist, and request named
properties when retrieving values. For a live property defined properties when retrieving values. For a live property defined
elsewhere, that definition can specify whether that live property elsewhere, that definition can specify whether or not that live
would be returned in 'allprop' requests or not. property would be returned in 'allprop' requests.
All servers MUST support returning a response of content type text/ All servers MUST support returning a response of content type text/
xml or application/xml that contains a multistatus XML element that xml or application/xml that contains a multistatus XML element that
describes the results of the attempts to retrieve the various describes the results of the attempts to retrieve the various
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
MUST be included in the response. A request to retrieve the value of result MUST be included in the response. A request to retrieve the
a property which does not exist is an error and MUST be noted with a value of a property that does not exist is an error and MUST be noted
'response' XML element which contains a 404 (Not Found) status value. with a 'response' XML element that 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
MUST include a 'response' XML element for each member URL of the MUST include a 'response' XML element for each member URL of the
collection, to whatever depth was requested. It SHOULD NOT include collection, to whatever depth was requested. It SHOULD NOT include
any 'response' elements for resources that are not WebDAV-compliant. any 'response' elements for resources that are not WebDAV-compliant.
Each 'response' element MUST contain an 'href' element that contains Each 'response' element MUST contain an 'href' element that contains
the URL of the resource on which the properties in the prop XML the URL of the resource on which the properties in the prop XML
element are defined. Results for a PROPFIND on a collection resource element are defined. Results for a PROPFIND on a collection resource
are returned as a flat list whose order of entries is not are returned as a flat list whose order of entries is not
significant. Note that a resource may have only one value for a significant. Note that a resource may have only one value for a
property of a given name, so the property may only show up once in property of a given name, so the 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.
skipping to change at page 42, line 11 skipping to change at page 37, line 35
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 in 'propstat' Element 9.1.2. Status Codes for Use in 'propstat' Element
In PROPFIND responses, information about individual properties is In PROPFIND responses, information about individual properties is
returned inside 'propstat' elements (see Section 14.22), each returned inside 'propstat' elements (see Section 14.22), each
containing an individual 'status' element containing information containing an individual 'status' element containing information
about the properties appearing in it. The list below summarizes the about the properties appearing in it. The list below summarizes the
most common status codes used inside 'propstat', however clients most common status codes used inside 'propstat'; however, clients
should be prepared to handle other 2/3/4/5xx series status codes as should be prepared to handle other 2/3/4/5xx series status codes as
well. well.
200 OK - A property exists and/or its value is successfully returned. 200 OK - A property exists and/or its value is successfully returned.
401 Unauthorized - The property cannot be viewed without appropriate 401 Unauthorized - The property cannot be viewed without appropriate
authorization. authorization.
403 Forbidden - The property cannot be viewed regardless of 403 Forbidden - The property cannot be viewed regardless of
authentication. authentication.
skipping to change at page 43, line 40 skipping to change at page 39, line 12
</D:responsedescription> </D:responsedescription>
</D:propstat> </D:propstat>
</D:response> </D:response>
<D:responsedescription> There has been an access violation error. <D:responsedescription> There has been an access violation error.
</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 - Using 'propname' to Retrieve All Property Names 9.1.4. 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"
skipping to change at page 45, line 50 skipping to change at page 40, line 30
<status>HTTP/1.1 200 OK</status> <status>HTTP/1.1 200 OK</status>
</propstat> </propstat>
</response> </response>
</multistatus> </multistatus>
In this example, PROPFIND is invoked on the collection resource In this example, PROPFIND is invoked on the collection resource
http://www.example.com/container/, with a propfind XML element http://www.example.com/container/, with a propfind XML element
containing the propname XML element, meaning the name of all containing the propname XML element, meaning the name of all
properties should be returned. Since no Depth header is present, it properties should be returned. Since no Depth header is present, it
assumes its default value of "infinity", meaning the name of the assumes its default value of "infinity", meaning the name of the
properties on the collection and all its descendents should be properties on the collection and all its descendants should be
returned. returned.
Consistent with the previous example, resource Consistent with the previous example, resource
http://www.example.com/container/ has six properties defined on it: http://www.example.com/container/ has six properties defined on it:
bigbox and author in the "http://ns.example.com/boxschema/" bigbox and author in the "http://ns.example.com/boxschema/"
namespace, and creationdate, displayname, resourcetype, and namespace, and creationdate, displayname, resourcetype, and
supportedlock in the "DAV:" namespace. supportedlock in the "DAV:" namespace.
The resource http://www.example.com/container/index.html, a member of The resource http://www.example.com/container/index.html, a member of
the "container" collection, has nine properties defined on it, bigbox the "container" collection, has nine properties defined on it, bigbox
in the "http://ns.example.com/boxschema/" namespace and, in the "http://ns.example.com/boxschema/" namespace and creationdate,
creationdate, displayname, getcontentlength, getcontenttype, getetag, displayname, getcontentlength, getcontenttype, getetag,
getlastmodified, resourcetype, and supportedlock in the "DAV:" getlastmodified, resourcetype, and supportedlock in the "DAV:"
namespace. namespace.
This example also demonstrates the use of XML namespace scoping and This example also demonstrates the use of XML namespace scoping and
the default namespace. Since the "xmlns" attribute does not contain the default namespace. Since the "xmlns" attribute does not contain
a prefix, the namespace applies by default to all enclosed elements. a prefix, the namespace applies by default to all enclosed elements.
Hence, all elements which do not explicitly state the namespace to Hence, all elements that do not explicitly state the namespace to
which they belong are members of the "DAV:" namespace. which they belong are members of the "DAV:" namespace.
9.1.5. Example - Using So-called 'allprop' 9.1.5. Example - Using So-called 'allprop'
Note that 'allprop', despite its name which remains for backward- Note that 'allprop', despite its name, which remains for backward-
compatibility, does not return every property, but only dead compatibility, does not return every property, but only dead
properties and the live properties defined in this specification. properties and the live properties defined in this specification.
>>Request >>Request
PROPFIND /container/ HTTP/1.1 PROPFIND /container/ 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
skipping to change at page 49, line 36 skipping to change at page 44, line 16
client requests the values of all live properties defined in this client requests the values of all live properties defined in this
specification, plus all dead properties, plus two more live specification, plus all dead properties, plus two more live
properties defined in [RFC3253]. The response is not shown. properties defined in [RFC3253]. The response is not shown.
9.2. PROPPATCH Method 9.2. PROPPATCH Method
The PROPPATCH method processes instructions specified in the request The PROPPATCH method processes instructions specified in the request
body to set and/or remove properties defined on the resource body to set and/or remove properties defined on the resource
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. propertyupdate XML element.
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 Sections 14.23 and 14.26.
If a server attempts to make any of the property changes in a If a server attempts to make any of the property changes in a
PROPPATCH request (i.e. the request is not rejected for high-level PROPPATCH request (i.e., the request is not rejected for high-level
errors before processing the body), the response MUST be a Multi- errors before processing the body), the response MUST be a Multi-
Status response as described in Section 9.2.1. Status response as described in Section 9.2.1.
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 'propstat' Element 9.2.1. Status Codes for Use in 'propstat' Element
In PROPPATCH responses, information about individual properties is In PROPPATCH responses, information about individual properties is
returned inside 'propstat' elements (see Section 14.22), each returned inside 'propstat' elements (see Section 14.22), each
containing an individual 'status' element containing information containing an individual 'status' element containing information
about the properties appearing in it. The list below summarizes the about the properties appearing in it. The list below summarizes the
most common status codes used inside 'propstat', however clients most common status codes used inside 'propstat'; however, clients
should be prepared to handle other 2/3/4/5xx series status codes as should be prepared to handle other 2/3/4/5xx series status codes as
well. 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.
skipping to change at page 52, line 40 skipping to change at page 46, line 40
"http://ns.example.com/standards/z39.50/" namespace, and to remove "http://ns.example.com/standards/z39.50/" namespace, and to remove
the property "Copyright-Owner" in the same namespace. Since the the property "Copyright-Owner" in the same namespace. Since the
Copyright-Owner property could not be removed, no property Copyright-Owner property could not be removed, no property
modifications occur. The 424 (Failed Dependency) status code for the modifications occur. The 424 (Failed Dependency) status code for the
Authors property indicates this action would have succeeded if it Authors property indicates this action would have succeeded if it
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
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 an internal member of its parent collection, make the Request-URI an internal member of its parent collection,
unless the Request-URI is "/". If no such ancestor exists, the unless the Request-URI is "/". If no such ancestor exists, the
method MUST fail. When the MKCOL operation creates a new collection method MUST fail. When the MKCOL operation creates a new collection
resource, all ancestors MUST already exist, or the method MUST fail resource, all ancestors MUST already exist, or the method MUST fail
with a 409 (Conflict) status code. For example, if a request to with a 409 (Conflict) status code. For example, if a request to
create collection /a/b/c/d/ is made, and /a/b/c/ does not exist, the create collection /a/b/c/d/ is made, and /a/b/c/ does not exist, the
request 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)
code. If the server decides to reject the request based on the status code. If the server decides to reject the request based on
presence of an entity or the type of an entity, it should use the 415 the presence of an entity or the type of an entity, it should use the
(Unsupported Media Type) status code. 415 (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.
skipping to change at page 54, line 18 skipping to change at page 48, line 18
Host: www.example.com Host: www.example.com
>>Response >>Response
HTTP/1.1 201 Created HTTP/1.1 201 Created
9.4. GET, HEAD for Collections 9.4. GET, HEAD for Collections
The semantics of GET are unchanged when applied to a collection, The semantics of GET are unchanged when applied to a collection,
since GET is defined as, "retrieve whatever information (in the form since GET is defined as, "retrieve whatever information (in the form
of an entity) is identified by the Request-URI" [RFC2616]. GET when of an entity) is identified by the Request-URI" [RFC2616]. GET, when
applied to a collection may return the contents of an "index.html" applied to a collection, may return the contents of an "index.html"
resource, a human-readable view of the contents of the collection, or resource, a human-readable view of the contents of the collection, or
something else altogether. Hence it is possible that the result of a something else altogether. Hence, it is possible that the result of
GET on a collection will bear no correlation to the membership of the a GET on a collection will bear no correlation to the membership of
collection. the collection.
Similarly, since the definition of HEAD is a GET without a response Similarly, since the definition of HEAD is a GET without a response
message body, the semantics of HEAD are unmodified when applied to message body, the semantics of HEAD are unmodified when applied to
collection resources. collection resources.
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
other actions) a subsequent GET/HEAD/PROPFIND request to the target other actions), a subsequent GET/HEAD/PROPFIND request to the target
Request-URI MUST return 404 (Not Found). Request-URI MUST return 404 (Not Found).
9.6.1. DELETE for Collections 9.6.1. DELETE for Collections
The DELETE method on a collection MUST act as if a "Depth: infinity" The DELETE method on a collection MUST act as if a "Depth: infinity"
header was used on it. A client MUST NOT submit a Depth header with header was used on it. A client MUST NOT submit a Depth header with
a DELETE on a collection with any value but infinity. a DELETE on a collection with any value but infinity.
DELETE instructs that the collection specified in the Request-URI and DELETE instructs that the collection specified in the Request-URI and
all resources identified by its internal member URLs are to be all resources identified by its internal member URLs are to be
deleted. deleted.
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
of the member's ancestors MUST NOT be deleted, so as to maintain URL all of the member's ancestors MUST NOT be deleted, so as to maintain
namespace consistency. URL 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 a member resource (a resource other than If an error occurs deleting a member resource (a resource other than
the resource identified in the Request-URI) then the response can be the resource identified in the Request-URI), then the response can be
a 207 (Multi-Status). Multi-Status is used here to indicate which a 207 (Multi-Status). Multi-Status is used here to indicate which
internal resources could NOT be deleted, including an error code internal resources could NOT be deleted, including an error code,
which should help the client understand which resources caused the which should help the client understand which resources caused the
failure. For example, the Multi-Status body could include a response failure. For example, the Multi-Status body could include a 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
Content) is the default success code. Content) is the default success code.
9.6.2. Example - DELETE 9.6.2. Example - DELETE
>>Request >>Request
DELETE /container/ HTTP/1.1 DELETE /container/ HTTP/1.1
Host: www.example.com Host: www.example.com
>>Response >>Response
skipping to change at page 56, line 19 skipping to change at page 50, line 19
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<d:multistatus xmlns:d="DAV:"> <d:multistatus xmlns:d="DAV:">
<d:response> <d:response>
<d:href>http://www.example.com/container/resource3</d:href> <d:href>http://www.example.com/container/resource3</d:href>
<d:status>HTTP/1.1 423 Locked</d:status> <d:status>HTTP/1.1 423 Locked</d:status>
<d:error><d:lock-token-submitted/></d:error> <d:error><d:lock-token-submitted/></d:error>
</d:response> </d:response>
</d:multistatus> </d:multistatus>
In this example the attempt to delete In this example, the attempt to delete
http://www.example.com/container/resource3 failed because it is http://www.example.com/container/resource3 failed because it is
locked, and no lock token was submitted with the request. locked, and no lock token was submitted with the request.
Consequently, the attempt to delete http://www.example.com/container/ Consequently, the attempt to delete http://www.example.com/container/
also failed. Thus the client knows that the attempt to delete also failed. Thus, the client knows that the attempt to delete
http://www.example.com/container/ must have also failed since the http://www.example.com/container/ must have also failed since the
parent can not be deleted unless its child has also been deleted. parent can not be deleted unless its child has also been deleted.
Even though a Depth header has not been included, a depth of infinity Even though a Depth header has not been included, a depth of infinity
is assumed because the method is on a collection. is assumed because the method is on a collection.
9.7. PUT Requirements 9.7. PUT Requirements
9.7.1. PUT for Non-Collection Resources 9.7.1. PUT for Non-Collection Resources
A PUT performed on an existing resource replaces the GET response A PUT performed on an existing resource replaces the GET response
skipping to change at page 57, line 5 skipping to change at page 51, line 7
A PUT request allows a client to indicate what media type an entity A PUT request allows a client to indicate what media type an entity
body has, and whether it should change if overwritten. Thus, a body has, and whether it should change if overwritten. Thus, a
client SHOULD provide a Content-Type for a new resource if any is client SHOULD provide a Content-Type for a new resource if any is
known. If the client does not provide a Content-Type for a new known. If the client does not provide a Content-Type for a new
resource, the server MAY create a resource with no Content-Type resource, the server MAY create a resource with no Content-Type
assigned, or it MAY attempt to assign a Content-Type. assigned, or it MAY attempt to assign a Content-Type.
Note that although a recipient ought generally to treat metadata Note that although a recipient ought generally to treat metadata
supplied with an HTTP request as authoritative, in practice there's supplied with an HTTP request as authoritative, in practice there's
no guarantee that a server will accept client-supplied metadata (e.g. no guarantee that a server will accept client-supplied metadata
any request header beginning with "Content-"). Many servers do not (e.g., any request header beginning with "Content-"). Many servers
allow configuring the Content-Type on a per-resource basis in the do not allow configuring the Content-Type on a per-resource basis in
first place. Thus, clients can't always rely on the ability to the first place. Thus, clients can't always rely on the ability to
directly influence the content type by including a Content-Type directly influence the content type by including a Content-Type
request header. request header.
9.7.2. PUT for Collections 9.7.2. PUT for Collections
This specification does not define the behavior of the PUT method for This specification does not define the behavior of the PUT method for
existing collections. A PUT request to an existing collection MAY be existing collections. A PUT request to an existing collection MAY be
treated as an error (405 Method Not Allowed). treated as an error (405 Method Not Allowed).
The MKCOL method is defined to create collections. The MKCOL method is defined to create collections.
9.8. COPY Method 9.8. COPY Method
The COPY method creates a duplicate of the source resource identified The COPY method creates a duplicate of the source resource identified
by the Request-URI, in the destination resource identified by the URI by the Request-URI, in the destination resource identified by the URI
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.
skipping to change at page 58, line 16 skipping to change at page 52, line 16
After a successful COPY invocation, all dead properties on the source After a successful COPY invocation, all dead properties on the source
resource SHOULD be duplicated on the destination resource. Live resource SHOULD be duplicated on the destination resource. Live
properties described in this document SHOULD be duplicated as properties described in this document SHOULD be duplicated as
identically behaving live properties at the destination resource, but identically behaving live properties at the destination resource, but
not necessarily with the same values. Servers SHOULD NOT convert not necessarily with the same values. Servers SHOULD NOT convert
live properties into dead properties on the destination resource, live properties into dead properties on the destination resource,
because clients may then draw incorrect conclusions about the state because clients may then draw incorrect conclusions about the state
or functionality of a resource. Note that some live properties are or functionality of a resource. Note that some live properties are
defined such that the absence of the property has a specific meaning defined such that the absence of the property has a specific meaning
(e.g. a flag with one meaning if present and the opposite if absent), (e.g., a flag with one meaning if present, and the opposite if
and in these cases, a successful COPY might result in the property absent), and in these cases, a successful COPY might result in the
being reported as "Not Found" in subsequent requests. property being reported as "Not Found" in subsequent requests.
When the destination is an unmapped URL, a COPY operation creates a When the destination is an unmapped URL, a COPY operation creates a
new resource much like a PUT operation does. Live properties which new resource much like a PUT operation does. Live properties that
are related to resource creation (such as DAV:creationdate) should are related to resource creation (such as DAV:creationdate) should
have their values set accordingly. 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.
An infinite depth COPY instructs that the collection resource An infinite-depth COPY instructs that the collection resource
identified by the Request-URI is to be copied to the location identified by the Request-URI is to be copied to the location
identified by the URI in the Destination header, and all its internal identified by the URI in the Destination header, and all its internal
member resources are to be copied to a location relative to it, member resources are to be copied to a location relative to it,
recursively through all levels of the collection hierarchy. Note recursively through all levels of the collection hierarchy. Note
that an infinite depth COPY of /A/ into /A/B/ could lead to infinite that an infinite-depth COPY of /A/ into /A/B/ could lead to infinite
recursion if not handled correctly. recursion if not handled correctly.
A COPY of "Depth: 0" only instructs that the collection and its A COPY of "Depth: 0" only instructs that the collection and its
properties but not resources identified by its internal member URLs, properties, but not resources identified by its internal member URLs,
are to be copied. are to be copied.
Any headers included with a COPY MUST be applied in processing every Any headers included with a COPY MUST be applied in processing every
resource to be copied with the exception of the Destination header. resource to be copied with the exception of the Destination header.
The Destination header only specifies the destination URI for the The Destination header only specifies the destination URI for the
Request-URI. When applied to members of the collection identified by Request-URI. When applied to members of the collection identified by
the Request-URI the value of Destination is to be modified to reflect the Request-URI, the value of Destination is to be modified to
the current location in the hierarchy. So, if the Request-URI is /a/ reflect the current location in the hierarchy. So, if the Request-
with Host header value http://example.com/ and the Destination is URI is /a/ with Host header value http://example.com/ and the
http://example.com/b/ then when http://example.com/a/c/d is processed Destination is http://example.com/b/, then when
it must use a Destination of http://example.com/b/c/d. http://example.com/a/c/d is processed, it must use a Destination of
http://example.com/b/c/d.
When the COPY method has completed processing it MUST have created a When the COPY method has completed processing, it MUST have created a
consistent URL namespace at the destination (see Section 5.1 for the consistent URL namespace at the destination (see Section 5.1 for the
definition of namespace consistency). However, if an error occurs definition of namespace consistency). However, if an error occurs
while copying an internal collection, the server MUST NOT copy any while copying an internal collection, the server MUST NOT copy any
resources identified by members of this collection (i.e., the server resources identified by members of this collection (i.e., the server
must skip this subtree), as this would create an inconsistent must skip this subtree), as this would create an inconsistent
namespace. After detecting an error, the COPY operation SHOULD try namespace. After detecting an error, the COPY operation SHOULD try
to finish as much of the original copy operation as possible (i.e., to finish as much of the original copy operation as possible (i.e.,
the server should still attempt to copy other subtrees and their the server should still attempt to copy other subtrees and their
members, that are not descendents of an error-causing collection). members that are not descendants of an error-causing collection).
So, for example, if an infinite depth copy operation is performed on So, for example, if an infinite-depth copy operation is performed on
collection /a/, which contains collections /a/b/ and /a/c/, and an collection /a/, which contains collections /a/b/ and /a/c/, and an
error occurs copying /a/b/, an attempt should still be made to copy error occurs copying /a/b/, an attempt should still be made to copy
/a/c/. Similarly, after encountering an error copying a non- /a/c/. Similarly, after encountering an error copying a non-
collection resource as part of an infinite depth copy, the server collection resource as part of an infinite-depth copy, the server
SHOULD try to finish as much of the original copy operation as SHOULD try to finish as much of the original copy operation as
possible. possible.
If an error in executing the COPY method occurs with a resource other If an error in executing the COPY method occurs with a resource other
than the resource identified in the Request-URI then the response than the resource identified in the Request-URI, then the response
MUST be a 207 (Multi-Status), and the URL of the resource causing the MUST be a 207 (Multi-Status), and the URL of the resource causing the
failure MUST appear with the specific error. failure MUST appear with the specific error.
The 424 (Failed Dependency) status code SHOULD NOT be returned in the The 424 (Failed Dependency) status code SHOULD NOT be returned in the
207 (Multi-Status) response from a COPY method. These responses can 207 (Multi-Status) response from a COPY method. These responses can
be safely omitted because the client will know that the progeny of a be safely omitted because the client will know that the progeny of a
resource could not be copied when the client receives an error for resource could not be copied when the client receives an error for
the parent. Additionally 201 (Created)/204 (No Content) status codes the parent. Additionally, 201 (Created)/204 (No Content) status
SHOULD NOT be returned as values in 207 (Multi-Status) responses from codes SHOULD NOT be returned as values in 207 (Multi-Status)
COPY methods. They, too, can be safely omitted because they are the responses from COPY methods. They, too, can be safely omitted
default success codes. because they are the default success codes.
9.8.4. COPY and Overwriting Destination Resources 9.8.4. COPY and Overwriting Destination Resources
If a COPY request has an Overwrite header with a value of "F", and a If a COPY request has an Overwrite header with a value of "F", and a
resource exists at the Destination URL, the server MUST fail the resource exists at the Destination URL, the server MUST fail the
request. request.
When a server executes a COPY request and overwrites a destination When a server executes a COPY request and overwrites a destination
resource, the exact behavior MAY depend on many factors, including resource, the exact behavior MAY depend on many factors, including
WebDAV extension capabilities (see particularly [RFC3253]). For WebDAV extension capabilities (see particularly [RFC3253]). For
skipping to change at page 60, line 12 skipping to change at page 54, line 15
delete the target resource before doing the copy, or could do an in- delete the target resource before doing the copy, or could do an in-
place overwrite to preserve live properties. place overwrite to preserve live properties.
When a collection is overwritten, the membership of the destination When a collection is overwritten, the membership of the destination
collection after the successful COPY request MUST be the same collection after the successful COPY request MUST be the same
membership as the source collection immediately before the COPY. membership as the source collection immediately before the COPY.
Thus, merging the membership of the source and destination Thus, merging the membership of the source and destination
collections together in the destination is not a compliant behavior. collections together in the destination is not a compliant behavior.
In general, if clients require the state of the destination URL to be In general, if clients require the state of the destination URL to be
wiped out prior to a COPY (e.g. to force live properties to be wiped out prior to a COPY (e.g., to force live properties to be
reset), then the client could send a DELETE to the destination before reset), then the client could send a DELETE to the destination before
the COPY request to ensure this reset. the COPY request to ensure this reset.
9.8.5. Status Codes 9.8.5. 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 COPY: status codes have specific applicability to COPY:
201 (Created) - The source resource was successfully copied. The 201 (Created) - The source resource was successfully copied. The
COPY operation resulted in the creation of a new resource. COPY operation resulted in the creation of a new resource.
204 (No Content) - The source resource was successfully copied to a 204 (No Content) - The source resource was successfully copied to a
pre-existing destination resource. preexisting destination resource.
207 (Multi-Status) - Multiple resources were to be affected by the 207 (Multi-Status) - Multiple resources were to be affected by the
COPY, but errors on some of them prevented the operation from taking COPY, but errors on some of them prevented the operation from taking
place. Specific error messages, together with the most appropriate place. Specific error messages, together with the most appropriate
of the source and destination URLs, appear in the body of the multi- of the source and destination URLs, appear in the body of the multi-
status response. E.g. if a destination resource was locked and could status response. For example, if a destination resource was locked
not be overwritten, then the destination resource URL appears with and could not be overwritten, then the destination resource URL
the 423 (Locked) status. appears with the 423 (Locked) status.
403 (Forbidden) - The operation is forbidden. A special case for 403 (Forbidden) - The operation is forbidden. A special case for
COPY could be that the source and destination resources are the same COPY could be that the source and destination resources are the same
resource. resource.
409 (Conflict) - A resource cannot be created at the destination 409 (Conflict) - A resource cannot be created at the destination
until one or more intermediate collections have been created. The until one or more intermediate collections have been created. The
server MUST NOT create those intermediate collections automatically. server MUST NOT create those intermediate collections automatically.
412 (Precondition Failed) - A precondition header check failed, e.g. 412 (Precondition Failed) - A precondition header check failed, e.g.,
the Overwrite header is "F" and the destination URL is already mapped the Overwrite header is "F" and the destination URL is already mapped
to a resource. to a resource.
423 (Locked) - The destination resource, or resource within the 423 (Locked) - The destination resource, or resource within the
destination collection, was locked. This response SHOULD contain the destination collection, was locked. This response SHOULD contain the
'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, repository or URL namespace. Either the source namespace server, repository, or URL namespace. Either the source namespace
does not support copying to the destination namespace, or the does not support copying to the destination namespace, or the
destination namespace refuses to accept the resource. The client may destination namespace refuses to accept the resource. The client may
wish to try GET/PUT and PROPFIND/PROPPATCH instead. wish to try GET/PUT and PROPFIND/PROPPATCH instead.
507 (Insufficient Storage) - The destination resource does not have 507 (Insufficient Storage) - The destination resource does not have
sufficient space to record the state of the resource after the sufficient space to record the state of the resource after the
execution of this method. execution of this method.
9.8.6. Example - COPY with Overwrite 9.8.6. Example - COPY with Overwrite
This example shows resource This example shows resource
http://www.example.com/~fielding/index.html being copied to the http://www.example.com/~fielding/index.html being copied to the
location http://www.example.com/users/f/fielding/index.html. The 204 location http://www.example.com/users/f/fielding/index.html. The 204
(No Content) status code indicates the existing resource at the (No Content) status code indicates that the existing resource at the
destination was overwritten. destination was overwritten.
>>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
>>Response >>Response
skipping to change at page 62, line 32 skipping to change at page 56, line 35
<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: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 in a single operation. The consistency actions are performed in a single operation. The consistency
maintenance step allows the server to perform updates caused by the maintenance step allows the server to perform updates caused by the
move, such as updating all URLs other than the Request-URI which move, such as updating all URLs, other than the Request-URI that
identify the source resource, to point to the new destination identifies the source resource, to point to the new destination
resource. resource.
The Destination header MUST be present on all MOVE methods and MUST The Destination header MUST be present on all MOVE methods and MUST
follow all COPY requirements for the COPY part of the MOVE method. follow all COPY requirements for the COPY part of the MOVE method.
All WebDAV compliant resources MUST support the MOVE method. All WebDAV-compliant resources MUST support the MOVE method.
Support for the MOVE method does not guarantee the ability to move a Support for the MOVE method does not guarantee the ability to move a
resource to a particular destination. For example, separate programs resource to a particular destination. For example, separate programs
may actually control different sets of resources on the same server. may actually control different sets of resources on the same server.
Therefore, it may not be possible to move a resource within a Therefore, it may not be possible to move a resource within a
namespace that appears to belong to the same server. 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
cases, a successful MOVE might result in the property being reported cases, a successful MOVE might result in the property being reported
as "Not Found" in subsequent requests. If the live properties will as "Not Found" in subsequent requests. If the live properties will
not work the same way at the destination, the server MAY fail the not work the same way at the destination, the server MAY fail the
request. request.
MOVE is frequently used by clients to rename a file without changing MOVE is frequently used by clients to rename a file without changing
its parent collection, so it's not appropriate to reset all live its parent collection, so it's not appropriate to reset all live
properties which are set at resource creation. For example, the DAV: properties that are set at resource creation. For example, the DAV:
creationdate property value SHOULD remain the same after a MOVE. creationdate property value SHOULD remain the same after a MOVE.
Dead properties MUST be moved along with the resource. Dead properties MUST be moved along with the resource.
9.9.2. MOVE for Collections 9.9.2. MOVE for Collections
A MOVE with "Depth: infinity" instructs that the collection A MOVE with "Depth: infinity" instructs that the collection
identified by the Request-URI be moved to the address specified in identified by the Request-URI be moved to the address specified in
the Destination header, and all resources identified by its internal the Destination header, and all resources identified by its internal
member URLs are to be moved to locations relative to it, recursively member URLs are to be moved to locations relative to it, recursively
skipping to change at page 64, line 6 skipping to change at page 58, line 10
The MOVE method on a collection MUST act as if a "Depth: infinity" The MOVE method on a collection MUST act as if a "Depth: infinity"
header was used on it. A client MUST NOT submit a Depth header on a header was used on it. A client MUST NOT submit a Depth header on a
MOVE on a collection with any value but "infinity". MOVE on a collection with any value but "infinity".
Any headers included with MOVE MUST be applied in processing every Any headers included with MOVE MUST be applied in processing every
resource to be moved with the exception of the Destination header. resource to be moved with the exception of the Destination header.
The behavior of the Destination header is the same as given for COPY The behavior of the Destination header is the same as given for COPY
on collections. on collections.
When the MOVE method has completed processing it MUST have created a When the MOVE method has completed processing, it MUST have created a
consistent URL namespace at both the source and destination (see consistent URL namespace at both the source and destination (see
section 5.1 for the definition of namespace consistency). However, Section 5.1 for the definition of namespace consistency). However,
if an error occurs while moving an internal collection, the server if an error occurs while moving an internal collection, the server
MUST NOT move any resources identified by members of the failed MUST NOT move any resources identified by members of the failed
collection (i.e., the server must skip the error-causing subtree), as collection (i.e., the server must skip the error-causing subtree), as
this would create an inconsistent namespace. In this case, after this would create an inconsistent namespace. In this case, after
detecting the error, the move operation SHOULD try to finish as much detecting the error, the move operation SHOULD try to finish as much
of the original move as possible (i.e., the server should still of the original move as possible (i.e., the server should still
attempt to move other subtrees and the resources identified by their attempt to move other subtrees and the resources identified by their
members, that are not descendents of an error-causing collection). members that are not descendants of an error-causing collection).
So, for example, if an infinite depth move is performed on collection So, for example, if an infinite-depth move is performed on collection
/a/, which contains collections /a/b/ and /a/c/, and an error occurs /a/, which contains collections /a/b/ and /a/c/, and an error occurs
moving /a/b/, an attempt should still be made to try moving /a/c/. moving /a/b/, an attempt should still be made to try moving /a/c/.
Similarly, after encountering an error moving a non-collection Similarly, after encountering an error moving a non-collection
resource as part of an infinite depth move, the server SHOULD try to resource as part of an infinite-depth move, the server SHOULD try to
finish as much of the original move operation as possible. finish as much of the original move operation as possible.
If an error occurs with a resource other than the resource identified If an error occurs with a resource other than the resource identified
in the Request-URI then the response MUST be a 207 (Multi-Status), in the Request-URI, then the response MUST be a 207 (Multi-Status),
and the errored resource's URL MUST appear with the specific error. and the errored resource's URL MUST appear with the specific error.
The 424 (Failed Dependency) status code SHOULD NOT be returned in the The 424 (Failed Dependency) status code SHOULD NOT be returned in the
207 (Multi-Status) response from a MOVE method. These errors can be 207 (Multi-Status) response from a MOVE method. These errors can be
safely omitted because the client will know that the progeny of a safely omitted because the client will know that the progeny of a
resource could not be moved when the client receives an error for the resource could not be moved when the client receives an error for the
parent. Additionally 201 (Created)/204 (No Content) responses SHOULD parent. Additionally, 201 (Created)/204 (No Content) responses
NOT be returned as values in 207 (Multi-Status) responses from a SHOULD NOT be returned as values in 207 (Multi-Status) responses from
MOVE. These responses can be safely omitted because they are the a MOVE. These responses can be safely omitted because they are the
default success codes. default success codes.
9.9.3. MOVE and the Overwrite Header 9.9.3. MOVE and the Overwrite Header
If a resource exists at the destination and the Overwrite header is If a resource exists at the destination and the Overwrite header is
"T" then prior to performing the move the server MUST perform a "T", then prior to performing the move, the server MUST perform a
DELETE with "Depth: infinity" on the destination resource. If the DELETE with "Depth: infinity" on the destination resource. If the
Overwrite header is set to "F" then the operation will fail. Overwrite header is set to "F", then the operation will fail.
9.9.4. Status Codes 9.9.4. 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 MOVE: status codes have specific applicability to MOVE:
201 (Created) - The source resource was successfully moved, and a new 201 (Created) - The source resource was successfully moved, and a new
URL mapping was created at the destination. URL mapping was created at the destination.
204 (No Content) - The source resource was successfully moved to a 204 (No Content) - The source resource was successfully moved to a
URL that was already mapped. URL that was already mapped.
207 (Multi-Status) - Multiple resources were to be affected by the 207 (Multi-Status) - Multiple resources were to be affected by the
MOVE, but errors on some of them prevented the operation from taking MOVE, but errors on some of them prevented the operation from taking
place. Specific error messages, together with the most appropriate place. Specific error messages, together with the most appropriate
of the source and destination URLs, appear in the body of the multi- of the source and destination URLs, appear in the body of the multi-
status response. E.g. if a source resource was locked and could not status response. For example, if a source resource was locked and
be moved, then the source resource URL appears with the 423 (Locked) could not be moved, then the source resource URL appears with the 423
status. (Locked) status.
403 (Forbidden) - Among many possible reasons for forbidding a MOVE 403 (Forbidden) - Among many possible reasons for forbidding a MOVE
operation, this status code is recommended for use when the source operation, this status code is recommended for use when the source
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
skipping to change at page 66, line 41 skipping to change at page 61, line 4
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: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
In this example the client has submitted a number of lock tokens with 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
error moving /container/C2/, none of /container/C2's members were error moving /container/C2/, none of /container/C2's members were
moved. However no errors were listed for those members due to the moved. However, no errors were listed for those members due to the
error minimization rules. User agent authentication has previously error minimization rules. User agent authentication has previously
occurred via a mechanism outside the scope of the HTTP protocol, in occurred via a mechanism outside the scope of the HTTP protocol, in
an underlying transport layer. an underlying transport layer.
9.10. LOCK Method 9.10. LOCK Method
The following sections describe the LOCK method, which is used to The following sections describe the LOCK method, which is used to
take out a lock of any access type and to refresh an existing lock. take out a lock of any access type and to refresh an existing lock.
These sections on the LOCK method describe only those semantics that These sections on the LOCK method describe only those semantics that
are specific to the LOCK method and are independent of the access are specific to the LOCK method and are independent of the access
type of the lock being requested. type of the lock being requested.
Any resource which supports the LOCK method MUST, at minimum, support Any resource that 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 an Existing Resource 9.10.1. Creating a Lock on an 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 an 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'
in the request body when the lock information is requested. The LOCK element in the LOCK request. The LOCK request MAY have a Timeout
request MAY have a Timeout header. 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.
skipping to change at page 68, line 21 skipping to change at page 62, line 33
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
the Request-URI along with all its members, all the way down the in the Request-URI along with all its members, all the way down 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. Similarly, if an UNLOCK is successfully executed single lock token. Similarly, if an UNLOCK is successfully executed
on this token, all associated resources are unlocked. Hence, partial on this token, all associated resources are unlocked. Hence, partial
success is not an option for LOCK or UNLOCK. Either the entire success is not an option for LOCK or UNLOCK. Either the entire
hierarchy is locked or no resources are locked. hierarchy is locked or no resources are 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 that prevented the lock from being granted, along with a
a suitable status code for that failure (e.g. 403 (Forbidden) or 423 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.
If no Depth header is submitted on a LOCK request then the request If no Depth header is submitted on a LOCK request, then the request
MUST act as if a "Depth:infinity" had been submitted. MUST act as if a "Depth:infinity" had been submitted.
9.10.4. Locking Unmapped URLs 9.10.4. Locking Unmapped URLs
A successful LOCK method MUST result in the creation of an empty A successful LOCK method MUST result in the creation of an empty
resource which is locked (and which is not a collection), when a resource that is locked (and that is not a collection) when a
resource did not previously exist at that URL. Later on, the lock resource did not previously exist at that URL. Later on, the lock
may go away but the empty resource remains. Empty resources MUST may go away but the empty resource remains. Empty resources MUST
then appear in PROPFIND responses including that URL in the response then appear in PROPFIND responses including that URL in the response
scope. A server MUST respond successfully to a GET request to an scope. A server MUST respond successfully to a GET request to an
empty resource, either by using a 204 No Content response, or by empty resource, either by using a 204 No Content response, or by
using 200 OK with a Content-Length header indicating zero length using 200 OK with a Content-Length header indicating zero length
9.10.5. Lock Compatibility Table 9.10.5. Lock Compatibility Table
The table below describes the behavior that occurs when a lock The table below describes the behavior that occurs when a lock
request is made on a resource. request is made on a resource.
+--------------------------+----------------+-------------------+ +--------------------------+----------------+-------------------+
| Current State | Shared Lock OK | Exclusive Lock OK | | Current State | Shared Lock OK | Exclusive Lock OK |
+--------------------------+----------------+-------------------+ +--------------------------+----------------+-------------------+
| None | True | True | | None | True | True |
| | | |
| Shared Lock | True | False | | Shared Lock | True | False |
| | | |
| Exclusive Lock | False | False* | | Exclusive Lock | False | False* |
+--------------------------+----------------+-------------------+ +--------------------------+----------------+-------------------+
Legend: True = lock may be granted. False = lock MUST NOT be Legend: True = lock may be granted. False = lock MUST NOT be
granted. *=It is illegal for a principal to request the same lock granted. *=It is illegal for a principal to request the same lock
twice. twice.
The current lock state of a resource is given in the leftmost column, The current lock state of a resource is given in the leftmost column,
and lock requests are listed in the first row. The intersection of a and lock requests are listed in the first row. The intersection of a
row and column gives the result of a lock request. For example, if a row and column gives the result of a lock request. For example, if a
shared lock is held on a resource, and an exclusive lock is shared lock is held on a resource, and an exclusive lock is
requested, the table entry is "false", indicating the lock must not requested, the table entry is "false", indicating that the lock must
be granted. not be granted.
9.10.6. LOCK Responses 9.10.6. LOCK Responses
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 LOCK: status codes have specific applicability to LOCK:
200 (OK) - The LOCK request succeeded and the value of the DAV: 200 (OK) - The LOCK request succeeded and the value of the DAV:
lockdiscovery property is included in the response body. lockdiscovery property is included in the response body.
201 (Created) - The LOCK request was to an unmapped URL, the request 201 (Created) - The LOCK request was to an unmapped URL, the request
succeeded and resulted in the creation of a new resource, and the succeeded and resulted in the creation of a new resource, and the
value of the DAV:lockdiscovery property is included in the response value of the DAV:lockdiscovery property is included in the response
body. body.
409 (Conflict) - A resource cannot be created at the destination 409 (Conflict) - A resource cannot be created at the destination
until one or more intermediate collections have been created. The until one or more intermediate collections have been created. The
server MUST NOT create those intermediate collections automatically. server MUST NOT create those intermediate collections automatically.
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 that is not compatible
compatible with the requested lock (see lock compatibility table with the requested lock (see lock compatibility table above).
above).
412 (Precondition Failed), with 'lock-token-matches-request-uri' 412 (Precondition Failed), with 'lock-token-matches-request-uri'
precondition code - The LOCK request was made with a If header, precondition code - The LOCK request was made with an If header,
indicating that the client wishes to refresh the given lock. indicating that the client wishes to refresh the given lock.
However, the Request-URI did not fall within the scope of the lock However, the Request-URI did not fall within the scope of the lock
identified by the token. The lock may have a scope that does not identified by the token. The lock may have a scope that does not
include the Request-URI, or the lock could have disappeared, or the include the Request-URI, or the lock could have disappeared, or the
token may be invalid. token may be invalid.
9.10.7. Example - Simple Lock Request 9.10.7. Example - Simple Lock Request
>>Request >>Request
skipping to change at page 73, line 49 skipping to change at page 67, line 36
<D:status>HTTP/1.1 403 Forbidden</D:status> <D:status>HTTP/1.1 403 Forbidden</D:status>
</D:response> </D:response>
<D:response> <D:response>
<D:href>http://example.com/webdav/</D:href> <D:href>http://example.com/webdav/</D:href>
<D:status>HTTP/1.1 424 Failed Dependency</D:status> <D:status>HTTP/1.1 424 Failed Dependency</D:status>
</D:response> </D:response>
</D:multistatus> </D:multistatus>
This example shows a request for an exclusive write lock on a This example shows a request for an exclusive write lock on a
collection and all its children. In this request, the client has collection and all its children. In this request, the client has
specified that it desires an infinite length lock, if available, specified that it desires an infinite-length lock, if available,
otherwise a timeout of 4.1 billion seconds, if available. The otherwise a timeout of 4.1 billion seconds, if available. The
request entity body contains the contact information for the request entity body contains the contact information for the
principal taking out the lock, in this case a web page URL. principal taking out the lock -- in this case, a Web page URL.
The error is a 403 (Forbidden) response on the resource The error is a 403 (Forbidden) response on the resource
http://example.com/webdav/secret. Because this resource could not be http://example.com/webdav/secret. Because this resource could not be
locked, none of the resources were locked. Note also that the a locked, none of the resources were locked. Note also that the a
'response' element for the Request-URI itself has been included as 'response' element for the Request-URI itself has been included as
required. required.
In this example, the nonce, response, and opaque fields have not been In this example, the nonce, response, and opaque fields have not been
calculated in the Authorization request header. calculated in the Authorization request header.
9.11. UNLOCK Method 9.11. UNLOCK Method
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 the Lock-Token header to provide the lock token is
consistent with other state-changing methods which all require an If not consistent with other state-changing methods, which all require
header with the lock token. Thus, the If header is not needed to an If header with the lock token. Thus, the If header is not needed
provide the lock token. Naturally when the If header is present it to provide the lock token. Naturally, when the If header is present,
has its normal meaning as a conditional header. it has its normal meaning as a conditional header.
For a successful response to this method, the server MUST delete the For a successful response to this method, the server MUST delete the
lock entirely. lock entirely.
If all resources which have been locked under the submitted lock If all resources that have been locked under the submitted lock token
token can not be unlocked then the UNLOCK request MUST fail. cannot 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 that supports the LOCK method MUST support
support the UNLOCK method. 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).
400 (Bad Request) - No lock token was provided. 400 (Bad Request) - No lock token was provided.
403 (Forbidden) - The currently authenticated principal does not have 403 (Forbidden) - The currently authenticated principal does not have
permission to remove the lock. permission to remove the lock.
409 (Conflict), with 'lock-token-matches-request-uri' precondition - 409 (Conflict), with 'lock-token-matches-request-uri' precondition -
The resource was not locked, or the request was made to a Request-URI The resource was not locked, or the request was made to a Request-URI
that was not within the scope of the lock. that was not within the scope of the lock.
9.11.2. Example - UNLOCK 9.11.2. Example - UNLOCK
skipping to change at page 76, line 20 skipping to change at page 69, line 46
commas. commas.
WebDAV adds two new conditional headers to the set defined in HTTP: WebDAV adds two new conditional headers to the set defined in HTTP:
the If and Overwrite headers. 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
; token is defined in RFC 2616, Section 2.2
Coded-URL = "<" absolute-URI ">" Coded-URL = "<" absolute-URI ">"
; No linear white space (LWS) allowed in Coded-URL ; No linear white space (LWS) allowed in Coded-URL
; absolute-URI is defined in RFC3986 ; absolute-URI defined in RFC 3986, Section 4.3
This general-header appearing in the response indicates that the This general-header appearing in the response indicates that the
resource supports the DAV schema and protocol as specified. All DAV resource supports the DAV schema and protocol as specified. All DAV-
compliant resources MUST return the DAV header with compliance-class compliant resources MUST return the DAV header with compliance-class
"1" on all OPTIONS responses. In cases where WebDAV is only "1" on all OPTIONS responses. In cases where WebDAV is only
supported in part of the server namespace, an OPTIONS request to non- supported in part of the server namespace, an OPTIONS request to non-
WebDAV resources (including "/") SHOULD NOT advertise WebDAV support. WebDAV resources (including "/") SHOULD NOT advertise WebDAV support.
The value is a comma-separated list of all compliance class The value is a comma-separated list of all compliance class
identifiers that the resource supports. Class identifiers may be identifiers that the resource supports. Class identifiers may be
Coded-URLs or tokens (as defined by [RFC2616]). Identifiers can Coded-URLs or tokens (as defined by [RFC2616]). Identifiers can
appear in any order. Identifiers that are standardized through the appear in any order. Identifiers that are standardized through the
IETF RFC process are tokens, but other identifiers SHOULD be Coded- IETF RFC process are tokens, but other identifiers SHOULD be Coded-
skipping to change at page 77, line 11 skipping to change at page 70, line 40
information. Clients SHOULD NOT send this header unless a standards information. Clients SHOULD NOT send this header unless a standards
track specification requires it. Any extension that makes use of track specification requires it. Any extension that makes use of
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 that 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 internal members only, ("Depth: 1"), or the resource resource and its internal members only ("Depth: 1"), or the resource
and all its members ("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 that 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
behavior of the method if a Depth header is not present. For behavior of the method if a Depth header is not present. For
example, the MOVE method only supports "Depth: infinity" and if a example, the MOVE method only supports "Depth: infinity", and if a
Depth header is not present will act as if a "Depth: infinity" header Depth header is not present, it will act as if a "Depth: infinity"
had been applied. header had been applied.
Clients MUST NOT rely upon methods executing on members of their Clients MUST NOT rely upon methods executing on members of their
hierarchies in any particular order or on the execution being atomic hierarchies in any particular order or on the execution being atomic
unless the particular method explicitly provides such guarantees. unless the particular method explicitly provides such guarantees.
Upon execution, a method with a Depth header will perform as much of Upon execution, a method with a Depth header will perform as much of
its assigned task as possible and then return a response specifying its assigned task as possible and then return a response specifying
what it was able to accomplish and what it failed to do. what it was able to accomplish and what it failed to do.
So, for example, an attempt to COPY a hierarchy may result in some of So, for example, an attempt to COPY a hierarchy may result in some of
the members being copied and some not. the members being copied and some not.
By default, the Depth header does not interact with other headers. By default, the Depth header does not interact with other headers.
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 source or destination resource within the scope of the Depth
with a Depth header is locked in such a way as to prevent the header is locked in such a way as to prevent the successful execution
successful execution of the method, then the lock token for that of the method, then the lock token for that resource MUST be
resource MUST be submitted with the request in the If request header. 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 members. If a resource does not have internal regards to internal members. If a resource does not have internal
members then the Depth header MUST be ignored. members, then the Depth header MUST be ignored.
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 that 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 (Section 4.3 of If the Destination value is an absolute-URI (Section 4.3 of
[RFC3986]), it may name a different server (or different port or [RFC3986]), it may name a different server (or different port or
scheme). If the source server cannot attempt a copy to the remote scheme). If the source server cannot attempt a copy to the remote
server, it MUST fail the request. Note that copying and moving server, it MUST fail the request. Note that copying and moving
resources to remote servers is not fully defined in this resources to remote servers is not fully defined in this
specification (e.g. specific error conditions). 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 with conditions that match tokens and ETags series of state lists with conditions that match tokens and ETags
to specific resource. If this header is evaluated and all state to a specific resource. If this header is evaluated and all state
lists fail, then the request MUST fail with a 412 (Precondition lists fail, then the request MUST fail with a 412 (Precondition
Failed) status. On the other hand, the request can succeed only Failed) status. On the other hand, the request can succeed only
if one of the described state lists succeeds. The success if one of the described state lists succeeds. The success
criteria for state lists and matching functions are defined in criteria for state lists and matching functions are defined in
Section 10.4.3 and Section 10.4.4. Sections 10.4.3 and 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 it 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 semantics for submitting a state token that state token. The semantics for submitting a state token
depend 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 or not the condition it expressed was found
true or not. to be true.
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 )
No-tag-list = List No-tag-list = List
Tagged-list = Resource-Tag 1*List Tagged-list = Resource-Tag 1*List
List = "(" 1*Condition ")" List = "(" 1*Condition ")"
Condition = ["Not"] (State-token | "[" entity-tag "]") Condition = ["Not"] (State-token | "[" entity-tag "]")
skipping to change at page 80, line 49 skipping to change at page 74, line 30
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.
Handling 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. If Header and Non-DAV Aware Proxies 10.4.5. If Header and Non-DAV-Aware Proxies
Non-DAV aware proxies will not honor the If header, since they will Non-DAV-aware proxies will not honor the If header, since they will
not understand the If header, and HTTP requires non-understood not understand the If header, and HTTP requires non-understood
headers to be ignored. When communicating with HTTP/1.1 proxies, the 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 client MUST use the "Cache-Control: no-cache" request header so as to
prevent the proxy from improperly trying to service the request from prevent the proxy from improperly trying to service the request from
its cache. When dealing with HTTP/1.0 proxies the "Pragma: no-cache" its cache. When dealing with HTTP/1.0 proxies, the "Pragma: no-
request header MUST be used for the same reason. cache" request header MUST be used for the same reason.
As in general clients may not be able to reliably detect non-DAV Because in general clients may not be able to reliably detect non-
aware intermediates, they are advised to always prevent caching using DAV-aware intermediates, they are advised to always prevent caching
the request directives mentioned above. using the request directives mentioned above.
10.4.6. Example - No-tag Production 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
skipping to change at page 81, line 42 skipping to change at page 75, line 28
( (
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.7. 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.8. 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. Lock
lock tokens are assigned by the server, following the uniqueness 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 cannot use the
exclude URIs in the "DAV:" scheme. Thus, by applying "Not" to a "DAV:" scheme. Thus, by applying "Not" to a state token that is
known not to be current state token, the Condition always evaluates known not to be current, the Condition always evaluates to true.
to true. Consequently, the whole If header will always evaluate to Consequently, the whole If header will always evaluate to true, and
true, and the lock token the lock token urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 will be
urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2 will be submitted in submitted in any case.
any case.
10.4.9. 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, either it 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.10. 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.11. 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.
skipping to change at page 83, line 28 skipping to change at page 77, line 14
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
apply to matching state tokens. considerations apply to matching state tokens.
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.
skipping to change at page 84, line 4 skipping to change at page 77, line 38
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 destination URL does map to a resource. COPY or MOVE operation if the destination URL does map to a resource.
If the overwrite header is not included in a COPY or MOVE request,
If the overwrite header is not included in a COPY or MOVE request
then the resource MUST treat the request as if it has an overwrite then the resource MUST treat the request as if it has an overwrite
header of value "T". While the Overwrite header appears to duplicate header of value "T". While the Overwrite header appears to duplicate
the functionality of using a "If-Match: *" header (see [RFC2616]), the functionality of using an "If-Match: *" header (see [RFC2616]),
If-Match applies only to the Request-URI, and not to the Destination If-Match applies only to the Request-URI, and not to the Destination
of a COPY or MOVE. of a COPY 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
TimeOut = "Timeout" ":" 1#TimeType TimeOut = "Timeout" ":" 1#TimeType
TimeType = ("Second-" DAVTimeOutVal | "Infinite") TimeType = ("Second-" DAVTimeOutVal | "Infinite")
; No LWS allowed within TimeType ; No LWS allowed within TimeType
DAVTimeOutVal = 1*DIGIT DAVTimeOutVal = 1*DIGIT
Clients MAY include Timeout request headers in their LOCK requests. Clients MAY include Timeout request headers in their LOCK requests.
However, the server is not required to honor or even consider these However, the server is not required to honor or even consider these
skipping to change at page 85, line 24 skipping to change at page 78, line 43
11.2. 422 Unprocessable Entity 11.2. 422 Unprocessable Entity
The 422 (Unprocessable Entity) status code means the server The 422 (Unprocessable Entity) status code means the server
understands the content type of the request entity (hence a understands the content type of the request entity (hence a
415(Unsupported Media Type) status code is inappropriate), and the 415(Unsupported Media Type) status code is inappropriate), and the
syntax of the request entity is correct (thus a 400 (Bad Request) syntax of the request entity is correct (thus a 400 (Bad Request)
status code is inappropriate) but was unable to process the contained status code is inappropriate) but was unable to process the contained
instructions. For example, this error condition may occur if an XML instructions. For example, this error condition may occur if an XML
request body contains well-formed (i.e., syntactically correct), but request body contains well-formed (i.e., syntactically correct), but
semantically erroneous XML instructions. semantically erroneous, XML instructions.
11.3. 423 Locked 11.3. 423 Locked
The 423 (Locked) status code means the source or destination resource The 423 (Locked) status code means the source or destination resource
of a method is locked. This response SHOULD contain an appropriate of a method is locked. This response SHOULD contain an appropriate
precondition or postcondition code, such as 'lock-token-submitted' or precondition or postcondition code, such as 'lock-token-submitted' or
'no-conflicting-lock". 'no-conflicting-lock'.
11.4. 424 Failed Dependency 11.4. 424 Failed Dependency
The 424 (Failed Dependency) status code means that the method could The 424 (Failed Dependency) status code means that the method could
not be performed on the resource because the requested action not be performed on the resource because the requested action
depended on another action and that action failed. For example, if a depended on another action and that action failed. For example, if a
command in a PROPPATCH method fails then, at minimum, the rest of the command in a PROPPATCH method fails, then, at minimum, the rest of
commands will also fail with 424 (Failed Dependency). the commands will also fail with 424 (Failed Dependency).
11.5. 507 Insufficient Storage 11.5. 507 Insufficient Storage
The 507 (Insufficient Storage) status code means the method could not The 507 (Insufficient Storage) status code means the method could not
be performed on the resource because the server is unable to store be performed on the resource because the server is unable to store
the representation needed to successfully complete the request. This the representation needed to successfully complete the request. This
condition is considered to be temporary. If the request which condition is considered to be temporary. If the request that
received this status code was the result of a user action, the received this status code was the result of a user action, the
request MUST NOT be repeated until it is requested by a separate user request MUST NOT be repeated until it is requested by a separate user
action. action.
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
skipping to change at page 87, line 41 skipping to change at page 80, line 41
as a whole (for instance, see Section 9.6.2). Some method as a whole (for instance, see Section 9.6.2). Some method
definitions provide information about specific status codes definitions provide information about specific status codes
clients should be prepared to see in a response. However, clients should be prepared to see in a response. However,
clients MUST be able to handle other status codes, using the clients MUST be able to handle other status codes, using the
generic rules defined in Section 10 of [RFC2616]. generic rules defined in Section 10 of [RFC2616].
2. For PROPFIND and PROPPATCH, the format has been extended using 2. For PROPFIND and PROPPATCH, the format has been extended using
the 'propstat' element instead of 'status', providing information the 'propstat' element instead of 'status', providing information
about individual properties of a resource. This format is about individual properties of a resource. This format is
specific to PROPFIND and PROPPATCH, and is described in detail in specific to PROPFIND and PROPPATCH, and is described in detail in
Section 9.1 and Section 9.2. Sections 9.1 and 9.2.
13.1. Response Headers 13.1. Response Headers
HTTP defines the Location header to indicate a preferred URL for the HTTP defines the Location header to indicate a preferred URL for the
resource that was addressed in the Request-URI (e.g. in response to resource that was addressed in the Request-URI (e.g., in response to
successful PUT requests or in redirect responses). However, use of successful PUT requests or in redirect responses). However, use of
this header creates ambiguity when there are URLs in the body of the this header creates ambiguity when there are URLs in the body of the
response, as with Multi-Status. Thus, use of the Location header response, as with Multi-Status. Thus, use of the Location header
with the Multi-Status response is intentionally undefined. with the Multi-Status response is intentionally undefined.
13.2. Handling Redirected Child Resources 13.2. Handling Redirected Child Resources
Redirect responses (300-303, 305 and 307) defined in HTTP 1.1 Redirect responses (300-303, 305, and 307) defined in HTTP 1.1
normally take a Location header to indicate the new URI for the normally take a Location header to indicate the new URI for the
single resource redirected from the Request-URI. Multi-Status single resource redirected from the Request-URI. Multi-Status
responses contain many resource addresses, but the original responses contain many resource addresses, but the original
definition in [RFC2518] did not have any place for the server to definition in [RFC2518] did not have any place for the server to
provide the new URI for redirected resources. This specification provide the new URI for redirected resources. This specification
does define a 'location' element for this information (see does define a 'location' element for this information (see
Section 14.9). Servers MUST use this new element with redirect Section 14.9). Servers MUST use this new element with redirect
responses in Multi-Status. responses in Multi-Status.
Clients encountering redirected resources in Multi-Status MUST NOT Clients encountering redirected resources in Multi-Status MUST NOT
rely on the 'location' element being present with a new URI. If the rely on the 'location' element being present with a new URI. If the
element is not present, the client MAY reissue the request to the element is not present, the client MAY reissue the request to the
individual redirected resource, because the response to that request individual redirected resource, because the response to that request
can be redirected with a Location header containing the new URI. can be redirected with a Location header containing the new URI.
13.3. Internal Status Codes 13.3. Internal Status Codes
Section 9.2.1, Section 9.1.2, Section 9.6.1, Section 9.8.3 and Sections 9.2.1, 9.1.2, 9.6.1, 9.8.3, and 9.9.2 define various status
Section 9.9.2 define various status codes used in Multi-Status codes used in Multi-Status responses. This specification does not
responses. This specification does not define the meaning of other define the meaning of other status codes that could appear in these
status codes that could appear in these responses. responses.
14. XML Element Definitions 14. XML Element Definitions
In this section, the final line of each section gives the element In this section, the final line of each section gives the element
type declaration using the format defined in [REC-XML]. The "Value" type declaration using the format defined in [REC-XML]. The "Value"
field, where present, specifies further restrictions on the allowable field, where present, specifies further restrictions on the allowable
contents of the XML element using BNF (i.e., to further restrict the contents of the XML element using BNF (i.e., to further restrict the
values of a PCDATA element). Note that all of the elements defined values of a PCDATA element). Note that all of the elements defined
here may be extended according to the rules defined in Section 17. here may be extended according to the rules defined in Section 17.
All elements defined here are in the "DAV:" namespace. All elements defined here are in the "DAV:" namespace.
skipping to change at page 90, line 4 skipping to change at page 82, line 29
Purpose: Identifies the associated resource as a collection. The Purpose: Identifies the associated resource as a collection. The
DAV:resourcetype property of a collection resource MUST contain DAV:resourcetype property of a collection resource MUST contain
this element. It is normally empty but extensions may add sub- this element. It is normally empty but extensions may add sub-
elements. elements.
<!ELEMENT collection EMPTY > <!ELEMENT collection EMPTY >
14.4. depth XML Element 14.4. depth XML Element
Name: depth Name: depth
Purpose: Used for representing depth values in XML content (e.g. in
lock information). Purpose: Used for representing depth values in XML content (e.g.,
in lock information).
Value: "0" | "1" | "infinity" Value: "0" | "1" | "infinity"
<!ELEMENT depth (#PCDATA) > <!ELEMENT depth (#PCDATA) >
14.5. error XML Element 14.5. error XML Element
Name: error Name: error
Purpose: Error responses, particularly 403 Forbidden and 409 Purpose: Error responses, particularly 403 Forbidden and 409
skipping to change at page 92, line 33 skipping to change at page 85, line 11
lock. lock.
<!ELEMENT lockscope (exclusive | shared) > <!ELEMENT lockscope (exclusive | shared) >
14.14. locktoken XML Element 14.14. locktoken XML Element
Name: locktoken Name: locktoken
Purpose: The lock token associated with a lock. Purpose: The lock token associated with a lock.
Description: The href contains a single lock token URI which refers Description: The href contains a single lock token URI, which
to the lock. refers to the lock.
<!ELEMENT locktoken (href) > <!ELEMENT locktoken (href) >
14.15. locktype XML Element 14.15. locktype XML Element
Name: locktype Name: locktype
Purpose: Specifies the access type of a lock. At present, this Purpose: Specifies the access type of a lock. At present, this
specification only defines one lock type, the write lock. specification only defines one lock type, the write lock.
<!ELEMENT locktype (write) > <!ELEMENT locktype (write) >
14.16. multistatus XML Element 14.16. multistatus XML Element
Name: multistatus Name: multistatus
Purpose: Contains multiple response messages. Purpose: Contains multiple response messages.
Description: The 'responsedescription' element at the top level is Description: The 'responsedescription' element at the top level is
used to provide a general message describing the overarching used to provide a general message describing the overarching
nature of the response. If this value is available an application nature of the response. If this value is available, an
may use it instead of presenting the individual response application may use it instead of presenting the individual
descriptions contained within the responses. response descriptions contained within the responses.
<!ELEMENT multistatus (response*, responsedescription?) > <!ELEMENT multistatus (response*, responsedescription?) >
14.17. owner XML Element 14.17. owner XML Element
Name: owner Name: owner
Purpose: Provides information about the creator of a lock. Purpose: Holds client-supplied information about the creator of a
lock.
Description: Allows a client to provide information sufficient for Description: Allows a client to provide information sufficient for
either directly contacting a principal (such as a telephone number either directly contacting a principal (such as a telephone number
or Email URI), or for discovering the principal (such as the URL or Email URI), or for discovering the principal (such as the URL
of a homepage) who created a lock. The value provided MUST be of a homepage) who created a lock. The value provided MUST be
treated as a dead property in terms of XML Information Item treated as a dead property in terms of XML Information Item
preservation. The server MUST NOT alter the value unless the preservation. The server MUST NOT alter the value unless the
owner value provided by the client is empty. For a certain amount owner value provided by the client is empty. For a certain amount
of interoperability between different client implementations, if of interoperability between different client implementations, if
clients have URI-formatted contact information for the lock clients have URI-formatted contact information for the lock
skipping to change at page 94, line 28 skipping to change at page 87, line 4
Purpose: Contains a request to alter the properties on a resource. Purpose: Contains a request to alter the properties on a resource.
Description: This XML element is a container for the information Description: This XML element is a container for the information
required to modify the properties on the resource. required to modify the properties on the resource.
<!ELEMENT propertyupdate (remove | set)+ > <!ELEMENT propertyupdate (remove | set)+ >
14.20. propfind XML Element 14.20. propfind XML Element
Name: propfind Name: propfind
Purpose: Specifies the properties to be returned from a PROPFIND Purpose: Specifies the properties to be returned from a PROPFIND
method. Four special elements are specified for use with method. Four special elements are specified for use with
'propfind': 'prop', 'allprop', 'include' and 'propname'. If 'propfind': 'prop', 'allprop', 'include', and 'propname'. If
'prop' is used inside 'propfind' it MUST NOT contain property 'prop' is used inside 'propfind', it MUST NOT contain property
values. values.
<!ELEMENT propfind ( propname | (allprop, include?) | prop ) > <!ELEMENT propfind ( propname | (allprop, include?) | prop ) >
14.21. propname XML Element 14.21. propname XML Element
Name: propname Name: propname
Purpose: Specifies that only a list of property names on the Purpose: Specifies that only a list of property names on the
resource is to be returned. resource is to be returned.
skipping to change at page 95, line 37 skipping to change at page 88, line 12
<!ELEMENT remove (prop) > <!ELEMENT remove (prop) >
14.24. response XML Element 14.24. response XML Element
Name: response Name: response
Purpose: Holds a single response describing the effect of a method Purpose: Holds a single response describing the effect of a method
on resource and/or its properties. on resource and/or its properties.
Description: The 'href' element contains a HTTP URL pointing to a Description: The 'href' element contains an HTTP URL pointing to a
WebDAV resource when used in the 'response' container. A WebDAV resource when used in the 'response' container. A
particular 'href' value MUST NOT appear more than once as the particular 'href' value MUST NOT appear more than once as the
child of a 'response' XML element under a 'multistatus' XML child of a 'response' XML element under a 'multistatus' XML
element. This requirement is necessary in order to keep element. This requirement is necessary in order to keep
processing costs for a response to linear time. Essentially, this processing costs for a response to linear time. Essentially, this
prevents having to search in order to group together all the prevents having to search in order to group together all the
responses by 'href'. There are, however, no requirements responses by 'href'. There are, however, no requirements
regarding ordering based on 'href' values. The optional regarding ordering based on 'href' values. The optional
precondition/postcondition element and 'responsedescription' text precondition/postcondition element and 'responsedescription' text
can provide additional information about this resource relative to can provide additional information about this resource relative to
skipping to change at page 96, line 28 skipping to change at page 88, line 50
14.26. set XML Element 14.26. set XML Element
Name: set Name: set
Purpose: Lists the property values to be set for a resource. Purpose: Lists the property values to be set for a resource.
Description: The 'set' element MUST contain only a 'prop' element. Description: The 'set' element MUST contain only a 'prop' element.
The elements contained by the 'prop' element inside the 'set' The elements contained by the 'prop' element inside the 'set'
element MUST specify the name and value of properties that are set element MUST specify the name and value of properties that are set
on the resource identified by Request-URI. If a property already on the resource identified by Request-URI. If a property already
exists then its value is replaced. Language tagging information exists, then its value is replaced. Language tagging information
appearing in the scope of the 'prop' element (in the "xml:lang" appearing in the scope of the 'prop' element (in the "xml:lang"
attribute, if present) MUST be persistently stored along with the attribute, if present) MUST be persistently stored along with the
property, and MUST be subsequently retrievable using PROPFIND. property, and MUST be subsequently retrievable using PROPFIND.
<!ELEMENT set (prop) > <!ELEMENT set (prop) >
14.27. shared XML Element 14.27. shared XML Element
Name: shared Name: shared
skipping to change at page 97, line 16 skipping to change at page 89, line 33
Value: status-line (defined in Section 6.1 of [RFC2616]) Value: status-line (defined in Section 6.1 of [RFC2616])
<!ELEMENT status (#PCDATA) > <!ELEMENT status (#PCDATA) >
14.29. timeout XML Element 14.29. timeout XML Element
Name: timeout Name: timeout
Purpose: The number of seconds remaining before a lock expires. Purpose: The number of seconds remaining before a lock expires.
Value: TimeType (defined in Section 10.7). Value: TimeType (defined in Section 10.7)
<!ELEMENT timeout (#PCDATA) > <!ELEMENT timeout (#PCDATA) >
14.30. write XML Element 14.30. write XML Element
Name: write Name: write
Purpose: Specifies a write lock. Purpose: Specifies a write lock.
<!ELEMENT write EMPTY > <!ELEMENT write EMPTY >
skipping to change at page 98, line 15 skipping to change at page 90, line 15
15. DAV Properties 15. DAV Properties
For DAV properties, the name of the property is also the same as the For DAV properties, the name of the property is also the same as the
name of the XML element that contains its value. In the section name of the XML element that contains its value. In the section
below, the final line of each section gives the element type below, the final line of each section gives the element type
declaration using the format defined in [REC-XML]. The "Value" declaration using the format defined in [REC-XML]. The "Value"
field, where present, specifies further restrictions on the allowable field, where present, specifies further restrictions on the allowable
contents of the XML element using BNF (i.e., to further restrict the contents of the XML element using BNF (i.e., to further restrict the
values of a PCDATA element). values of a PCDATA element).
A protected property is one which cannot be changed with a PROPPATCH A protected property is one that cannot be changed with a PROPPATCH
request. There may be other requests which would result in a change request. There may be other requests that would result in a change
to a protected property (as when a LOCK request affects the value of to a protected property (as when a LOCK request affects the value of
DAV:lockdiscovery). Note that a given property could be protected on DAV:lockdiscovery). Note that a given property could be protected on
one type of resource, but not protected on another type of resource. one type of resource, but not protected on another type of resource.
A computed property is one with a value defined in terms of a A computed property is one with a value defined in terms of a
computation (based on the content and other properties of that computation (based on the content and other properties of that
resource, or even of some other resource). A computed property is resource, or even of some other resource). A computed property is
always a protected property. always a protected property.
COPY and MOVE behavior refers to local COPY and MOVE operations. COPY and MOVE behavior refers to local COPY and MOVE operations.
skipping to change at page 98, line 39 skipping to change at page 90, line 39
the header value could include LWS as defined in [RFC2616], Section the header value could include LWS as defined in [RFC2616], Section
4.2. Server implementors SHOULD strip LWS from these values before 4.2. Server implementors SHOULD strip LWS from these values before
using as WebDAV property values. using as WebDAV property values.
15.1. creationdate Property 15.1. creationdate Property
Name: creationdate Name: creationdate
Purpose: Records the time and date the resource was created. Purpose: Records the time and date the resource was created.
Value: date-time (defined in [RFC3339], see the ABNF in section Value: date-time (defined in [RFC3339], see the ABNF in Section
5.6.) 5.6.)
Protected: MAY be protected. Some servers allow DAV:creationdate Protected: MAY be protected. Some servers allow DAV:creationdate
to be changed to reflect the time the document was created if that to be changed to reflect the time the document was created if that
is more meaningful to the user (rather than the time it was is more meaningful to the user (rather than the time it was
uploaded). Thus, clients SHOULD NOT use this property in uploaded). Thus, clients SHOULD NOT use this property in
synchronization logic (use DAV:getetag instead). synchronization logic (use DAV:getetag instead).
COPY/MOVE behaviour: This property value SHOULD be kept during a COPY/MOVE behavior: This property value SHOULD be kept during a
MOVE operation, but is normally re-initialized when a resource is MOVE operation, but is normally re-initialized when a resource is
created with a COPY. It should not be set in a COPY. created with a COPY. It should not be set in a COPY.
Description: The DAV:creationdate property SHOULD be defined on all Description: The DAV:creationdate property SHOULD be defined on all
DAV compliant resources. If present, it contains a timestamp of DAV compliant resources. If present, it contains a timestamp of
the moment when the resource was created. Servers that are the moment when the resource was created. Servers that are
incapable of persistently recording the creation date SHOULD incapable of persistently recording the creation date SHOULD
instead leave it undefined (i.e. report "Not Found"). instead leave it undefined (i.e. report "Not Found").
<!ELEMENT creationdate (#PCDATA) > <!ELEMENT creationdate (#PCDATA) >
skipping to change at page 99, line 26 skipping to change at page 91, line 26
Purpose: Provides a name for the resource that is suitable for Purpose: Provides a name for the resource that is suitable for
presentation to a user. presentation to a user.
Value: Any text. Value: Any text.
Protected: SHOULD NOT be protected. Note that servers implementing Protected: SHOULD NOT be protected. Note that servers implementing
[RFC2518] might have made this a protected property as this is a [RFC2518] might have made this a protected property as this is a
new requirement. new requirement.
COPY/MOVE behaviour: This property value SHOULD be preserved in COPY/MOVE behavior: This property value SHOULD be preserved in COPY
COPY and MOVE operations. and MOVE operations.
Description: Contains a description of the resource that is Description: Contains a description of the resource that is
suitable for presentation to a user. This property is defined on suitable for presentation to a user. This property is defined on
the resource, and hence SHOULD have the same value independent of the resource, and hence SHOULD have the same value independent of
the Request-URI used to retrieve it (thus computing this property the Request-URI used to retrieve it (thus, computing this property
based on the Request-URI is deprecated). While generic clients based on the Request-URI is deprecated). While generic clients
might display the property value to end users, client UI designers might display the property value to end users, client UI designers
must understand that the method for identifying resources is still must understand that the method for identifying resources is still
the URL. Changes to DAV:displayname do not issue moves or copies the URL. Changes to DAV:displayname do not issue moves or copies
to the server, but simply change a piece of meta-data on the to the server, but simply change a piece of meta-data on the
individual resource. Two resources can have the same DAV: individual resource. Two resources can have the same DAV:
displayname value even within the same collection. displayname value even within the same collection.
<!ELEMENT displayname (#PCDATA) > <!ELEMENT displayname (#PCDATA) >
15.3. getcontentlanguage Property 15.3. getcontentlanguage Property
Name: getcontentlanguage Name: getcontentlanguage
Purpose: Contains the Content-Language header value (from Section Purpose: Contains the Content-Language header value (from Section
14.12 of [RFC2616]) as it would be returned by a GET without 14.12 of [RFC2616]) as it would be returned by a GET without
accept headers. accept headers.
Value: language-tag (language-tag is defined in Section 3.10 of Value: language-tag (language-tag is defined in Section 3.10 of
[RFC2616]). [RFC2616])
Protected: SHOULD NOT be protected, so that clients can reset the Protected: SHOULD NOT be protected, so that clients can reset the
language. Note that servers implementing [RFC2518] might have language. Note that servers implementing [RFC2518] might have
made this a protected property as this is a new requirement. made this a protected property as this is a new requirement.
COPY/MOVE behaviour: This property value SHOULD be preserved in COPY/MOVE behavior: This property value SHOULD be preserved in COPY
COPY and MOVE operations. and MOVE operations.
Description: The DAV:getcontentlanguage property MUST be defined on Description: The DAV:getcontentlanguage property MUST be defined on
any DAV compliant resource that returns the Content-Language any DAV-compliant resource that returns the Content-Language
header on a GET. header on a GET.
<!ELEMENT getcontentlanguage (#PCDATA) > <!ELEMENT getcontentlanguage (#PCDATA) >
15.4. getcontentlength Property 15.4. getcontentlength Property
Name: getcontentlength Name: getcontentlength
Purpose: Contains the Content-Length header returned by a GET Purpose: Contains the Content-Length header returned by a GET
without accept headers. without accept headers.
Value: See Section 14.13 of [RFC2616]. Value: See Section 14.13 of [RFC2616].
Protected: This property is computed, therefore protected. Protected: This property is computed, therefore protected.
Description: The DAV:getcontentlength property MUST be defined on Description: The DAV:getcontentlength property MUST be defined on
any DAV compliant resource that returns the Content-Length header any DAV-compliant resource that returns the Content-Length header
in response to a GET. in response to a GET.
COPY/MOVE behaviour: This property value is dependent on the size COPY/MOVE behavior: This property value is dependent on the size of
of the destination resource, not the value of the property on the the destination resource, not the value of the property on the
source resource. source resource.
<!ELEMENT getcontentlength (#PCDATA) > <!ELEMENT getcontentlength (#PCDATA) >
15.5. getcontenttype Property 15.5. getcontenttype Property
Name: getcontenttype Name: getcontenttype
Purpose: Contains the Content-Type header value (from Section 14.17 Purpose: Contains the Content-Type header value (from Section 14.17
of [RFC2616]) as it would be returned by a GET without accept of [RFC2616]) as it would be returned by a GET without accept
headers. headers.
Value: media-type (defined in Section 3.7 of [RFC2616]) Value: media-type (defined in Section 3.7 of [RFC2616])
Protected: Potentially protected if the server prefers to assign Protected: Potentially protected if the server prefers to assign
content types on its own (see also discussion in Section 9.7.1). content types on its own (see also discussion in Section 9.7.1).
COPY/MOVE behaviour: This property value SHOULD be preserved in COPY/MOVE behavior: This property value SHOULD be preserved in COPY
COPY and MOVE operations. and MOVE operations.
Description: This property MUST be defined on any DAV compliant Description: This property MUST be defined on any DAV-compliant
resource that returns the Content-Type header in response to a resource that returns the Content-Type header in response to a
GET. GET.
<!ELEMENT getcontenttype (#PCDATA) > <!ELEMENT getcontenttype (#PCDATA) >
15.6. getetag Property 15.6. getetag Property
Name: getetag Name: getetag
Purpose: Contains the ETag header value (from Section 14.19 of Purpose: Contains the ETag header value (from Section 14.19 of
[RFC2616]) as it would be returned by a GET without accept [RFC2616]) as it would be returned by a GET without accept
headers. headers.
Value: entity-tag (defined in Section 3.11 of [RFC2616]) Value: entity-tag (defined in Section 3.11 of [RFC2616])
Protected: MUST be protected because this value is created and Protected: MUST be protected because this value is created and
controlled by the server. controlled by the server.
COPY/MOVE behaviour: This property value is dependent on the final COPY/MOVE behavior: This property value is dependent on the final
state of the destination resource, not the value of the property state of the destination resource, not the value of the property
on the source resource. Also note the considerations in on the source resource. Also note the considerations in
Section 8.8. Section 8.8.
Description: The getetag property MUST be defined on any DAV Description: The getetag property MUST be defined on any DAV-
compliant resource that returns the Etag header. Refer to Section compliant resource that returns the Etag header. Refer to Section
3.11 of RFC2616 for a complete definition of the semantics of an 3.11 of RFC2616 for a complete definition of the semantics of an
ETag, and to Section 8.6 for a discussion of ETags in WebDAV. ETag, and to Section 8.6 for a discussion of ETags in WebDAV.
<!ELEMENT getetag (#PCDATA) > <!ELEMENT getetag (#PCDATA) >
15.7. getlastmodified Property 15.7. getlastmodified Property
Name: getlastmodified Name: getlastmodified
Purpose: Contains the Last-Modified header value (from Section Purpose: Contains the Last-Modified header value (from Section
14.29 of [RFC2616]) as it would be returned by a GET method 14.29 of [RFC2616]) as it would be returned by a GET method
without accept headers. without accept headers.
Value: rfc1123-date (defined in Section 3.3.1 of [RFC2616]) Value: rfc1123-date (defined in Section 3.3.1 of [RFC2616])
Protected: SHOULD be protected because some clients may rely on the Protected: SHOULD be protected because some clients may rely on the
value for appropriate caching behavior, or on the value of the value for appropriate caching behavior, or on the value of the
Last-Modified header to which this property is linked. Last-Modified header to which this property is linked.
COPY/MOVE behaviour: This property value is dependent on the last COPY/MOVE behavior: This property value is dependent on the last
modified date of the destination resource, not the value of the modified date of the destination resource, not the value of the
property on the source resource. Note that some server property on the source resource. Note that some server
implementations use the file system date modified value for the implementations use the file system date modified value for the
DAV:getlastmodified value, and this can be preserved in a MOVE DAV:getlastmodified value, and this can be preserved in a MOVE
even when the HTTP Last-Modified value SHOULD change. Note that even when the HTTP Last-Modified value SHOULD change. Note that
since [RFC2616] requires clients to use ETags where provided, a since [RFC2616] requires clients to use ETags where provided, a
server implementing ETags can count on clients using a much better server implementing ETags can count on clients using a much better
mechanism than modification dates for offline synchronization or mechanism than modification dates for offline synchronization or
cache control. Also note the considerations in Section 8.8. cache control. Also note the considerations in Section 8.8.
Description: Note that the last-modified date on a resource SHOULD Description: The last-modified date on a resource SHOULD only
only reflect changes in the body (the GET responses) of the reflect changes in the body (the GET responses) of the resource.
resource. A change in a property only SHOULD NOT cause the last- A change in a property only SHOULD NOT cause the last-modified
modified date to change, because clients MAY rely on the last- date to change, because clients MAY rely on the last-modified date
modified date to know when to overwrite the existing body. The to know when to overwrite the existing body. The DAV:
DAV:getlastmodified property MUST be defined on any DAV compliant getlastmodified property MUST be defined on any DAV-compliant
resource that returns the Last-Modified header in response to a resource that returns the Last-Modified header in response to a
GET. GET.
<!ELEMENT getlastmodified (#PCDATA) > <!ELEMENT getlastmodified (#PCDATA) >
15.8. lockdiscovery Property 15.8. lockdiscovery Property
Name: lockdiscovery Name: lockdiscovery
Purpose: Describes the active locks on a resource Purpose: Describes the active locks on a resource
Protected: MUST be protected. Clients change the list of locks Protected: MUST be protected. Clients change the list of locks
through LOCK and UNLOCK, not through PROPPATCH. through LOCK and UNLOCK, not through PROPPATCH.
COPY/MOVE behaviour: The value of this property depends on the lock COPY/MOVE behavior: The value of this property depends on the lock
state of the destination, not on the locks of the source resource. state of the destination, not on the locks of the source resource.
Recall that locks are not moved in a MOVE operation. Recall that locks are not moved in a MOVE operation.
Description: Returns a listing of who has a lock, what type of lock Description: Returns a listing of who has a lock, what type of lock
he has, the timeout type and the time remaining on the timeout, he has, the timeout type and the time remaining on the timeout,
and the associated lock token. Owner information MAY be omitted and the associated lock token. Owner information MAY be omitted
if it is considered sensitive. If there are no locks, but the if it is considered sensitive. If there are no locks, but the
server supports locks, the property will be present but contain server supports locks, the property will be present but contain
zero 'activelock' elements. If there is one or more lock, an zero 'activelock' elements. If there are one or more locks, an
'activelock' element appears for each lock on the resource. This 'activelock' element appears for each lock on the resource. This
property is NOT lockable with respect to write locks (Section 7). property is NOT lockable with respect to write locks (Section 7).
<!ELEMENT lockdiscovery (activelock)* > <!ELEMENT lockdiscovery (activelock)* >
15.8.1. Example - Retrieving DAV:lockdiscovery 15.8.1. Example - Retrieving DAV:lockdiscovery
>>Request >>Request
PROPFIND /container/ HTTP/1.1 PROPFIND /container/ HTTP/1.1
skipping to change at page 105, line 5 skipping to change at page 96, line 17
15.9. resourcetype Property 15.9. resourcetype Property
Name: resourcetype Name: resourcetype
Purpose: Specifies the nature of the resource. Purpose: Specifies the nature of the resource.
Protected: SHOULD be protected. Resource type is generally decided Protected: SHOULD be protected. Resource type is generally decided
through the operation creating the resource (MKCOL vs PUT), not by through the operation creating the resource (MKCOL vs PUT), not by
PROPPATCH. PROPPATCH.
COPY/MOVE behaviour: Generally a COPY/MOVE of a resource results in COPY/MOVE behavior: Generally a COPY/MOVE of a resource results in
the same type of resource at the destination. the same type of resource at the destination.
Description: MUST be defined on all DAV compliant resources. Each Description: MUST be defined on all DAV-compliant resources. Each
child element identifies a specific type the resource belongs to, child element identifies a specific type the resource belongs to,
such as 'collection', which is the only resource type defined by such as 'collection', which is the only resource type defined by
this specification (see Section 14.3). If the element contains this specification (see Section 14.3). If the element contains
the 'collection' child element plus additional unrecognized the 'collection' child element plus additional unrecognized
elements, it should generally be treated as a collection. If the elements, it should generally be treated as a collection. If the
element contains no recognized child elements, it should be element contains no recognized child elements, it should be
treated as a non-collection resource. The default value is empty. treated as a non-collection resource. The default value is empty.
This element MUST NOT contain text or mixed content. Any custom This element MUST NOT contain text or mixed content. Any custom
child element is considered to be an identifier for a resource child element is considered to be an identifier for a resource
type. type.
skipping to change at page 105, line 34 skipping to change at page 96, line 46
<f:search-results xmlns:f="http://www.example.com/ns"/> <f:search-results xmlns:f="http://www.example.com/ns"/>
</x:resourcetype> </x:resourcetype>
15.10. supportedlock Property 15.10. supportedlock Property
Name: supportedlock Name: supportedlock
Purpose: To provide a listing of the lock capabilities supported by Purpose: To provide a listing of the lock capabilities supported by
the resource. the resource.
Protected: MUST be protected. Servers determine what lock Protected: MUST be protected. Servers, not clients, determine what
mechanisms are supported, not clients. lock mechanisms are supported.
COPY/MOVE behaviour: This property value is dependent on the kind COPY/MOVE behavior: This property value is dependent on the kind of
of locks supported at the destination, not on the value of the locks supported at the destination, not on the value of the
property at the source resource. Servers attempting to COPY to a property at the source resource. Servers attempting to COPY to a
destination should not attempt to set this property at the destination should not attempt to set this property at the
destination. destination.
Description: Returns a listing of the combinations of scope and Description: Returns a listing of the combinations of scope and
access types which may be specified in a lock request on the access types that may be specified in a lock request on the
resource. Note that the actual contents are themselves controlled resource. Note that the actual contents are themselves controlled
by access controls so a server is not required to provide by access controls, so a server is not required to provide
information the client is not authorized to see. This property is information the client is not authorized to see. This property is
NOT lockable with respect to write locks (Section 7). NOT lockable with respect to write locks (Section 7).
<!ELEMENT supportedlock (lockentry)* > <!ELEMENT supportedlock (lockentry)* >
15.10.1. Example - Retrieving DAV:supportedlock 15.10.1. Example - Retrieving DAV:supportedlock
>>Request >>Request
PROPFIND /container/ HTTP/1.1 PROPFIND /container/ HTTP/1.1
skipping to change at page 107, line 34 skipping to change at page 98, line 42
of a top-level 'error' element in the response body, unless otherwise of a top-level 'error' element in the response body, unless otherwise
negotiated by the request, along with an appropriate response status. negotiated by the request, along with an appropriate response status.
The most common response status codes are 403 (Forbidden) if the The most common response status codes are 403 (Forbidden) if the
request should not be repeated because it will always fail, and 409 request should not be repeated because it will always fail, and 409
(Conflict) if it is expected that the user might be able to resolve (Conflict) if it is expected that the user might be able to resolve
the conflict and resubmit the request. The 'error' element MAY the conflict and resubmit the request. The 'error' element MAY
contain child elements with specific error information and MAY be contain child elements with specific error information and MAY be
extended with any custom child elements. extended with any custom child elements.
This mechanism does not take the place of using a correct numeric This mechanism does not take the place of using a correct numeric
status code as defined here or in HTTP, because the client MUST status code as defined here or in HTTP, because the client must
always be able to take a reasonable course of action based only on always be able to take a reasonable course of action based only on
the numeric code. However, it does remove the need to define new the numeric code. However, it does remove the need to define new
numeric codes. The new machine-readable codes used for this purpose numeric codes. The new machine-readable codes used for this purpose
are XML elements classified as preconditions and postconditions, so are XML elements classified as preconditions and postconditions, so
naturally any group defining a new condition code can use their own naturally, any group defining a new condition code can use their own
namespace. As always, the "DAV:" namespace is reserved for use by namespace. As always, the "DAV:" namespace is reserved for use by
IETF-chartered WebDAV working groups. IETF-chartered WebDAV working groups.
A server supporting this specification SHOULD use the XML error A server supporting this specification SHOULD use the XML error
whenever a precondition or postcondition defined in this document is whenever a precondition or postcondition defined in this document is
violated. For error conditions not specified in this document, the violated. For error conditions not specified in this document, the
server MAY simply choose an appropriate numeric status and leave the server MAY simply choose an appropriate numeric status and leave the
response body blank. However, a server MAY instead use a custom response body blank. However, a server MAY instead use a custom
condition code and other supporting text, because even when clients condition code and other supporting text, because even when clients
do not automatically recognize condition codes they can be quite do not automatically recognize condition codes, they can be quite
useful in interoperability testing and debugging. useful in interoperability testing and debugging.
Example - Response with precondition code Example - Response with precondition code
>>Response >>Response
HTTP/1.1 423 Locked HTTP/1.1 423 Locked
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:error xmlns:D="DAV:"> <D:error xmlns:D="DAV:">
<D:lock-token-submitted> <D:lock-token-submitted>
<D:href>/workspace/webdav/</D:href> <D:href>/workspace/webdav/</D:href>
skipping to change at page 108, line 47 skipping to change at page 100, line 12
a scope that does not include the Request-URI, or the lock could a scope that does not include the Request-URI, or the lock could
have disappeared, or the token may be invalid. have disappeared, or the token may be invalid.
Name: lock-token-submitted (precondition) Name: lock-token-submitted (precondition)
Use with: 423 Locked Use with: 423 Locked
Purpose: The request could not succeed because a lock token should Purpose: The request could not succeed because a lock token should
have been submitted. This element, if present, MUST contain at have been submitted. This element, if present, MUST contain at
least one URL of a locked resource that prevented the request. In least one URL of a locked resource that prevented the request. In
cases of MOVE, COPY and DELETE where collection locks are cases of MOVE, COPY, and DELETE where collection locks are
involved, it can be difficult for the client to find out which involved, it can be difficult for the client to find out which
locked resource made the request fail -- but the server is only locked resource made the request fail -- but the server is only
resonsible for returning one such locked resource. The server MAY responsible for returning one such locked resource. The server
return every locked resource that prevented the request from MAY return every locked resource that prevented the request from
succeeding if it knows them all. succeeding if it knows them all.
<!ELEMENT lock-token-submitted (href+) > <!ELEMENT lock-token-submitted (href+) >
Name: no-conflicting-lock (precondition) Name: no-conflicting-lock (precondition)
Use with: Typically 423 Locked Use with: Typically 423 Locked
Purpose: A LOCK request failed due the presence of an already Purpose: A LOCK request failed due the presence of an already
existing conflicting lock. Note that a lock can be in conflict existing conflicting lock. Note that a lock can be in conflict
although the resource to which the request was directed is only although the resource to which the request was directed is only
indirectly locked. In this case, the precondition code can be indirectly locked. In this case, the precondition code can be
used to inform the client about the resource which is the root of used to inform the client about the resource that is the root of
the conflicting lock, avoiding a separate lookup of the the conflicting lock, avoiding a separate lookup of the
"lockdiscovery" property. "lockdiscovery" property.
<!ELEMENT no-conflicting-lock (href)* > <!ELEMENT no-conflicting-lock (href)* >
Name: no-external-entities Name: no-external-entities
Use with: 403 Forbidden Use with: 403 Forbidden
Purpose: (precondition) -- If the server rejects a client request Purpose: (precondition) -- If the server rejects a client request
skipping to change at page 111, line 16 skipping to change at page 101, line 33
The XML namespace extension ([REC-XML-NAMES]) is used in this The XML namespace extension ([REC-XML-NAMES]) is used in this
specification in order to allow for new XML elements to be added specification in order to allow for new XML elements to be added
without fear of colliding with other element names. Although WebDAV without fear of colliding with other element names. Although WebDAV
request and response bodies can be extended by arbitrary XML request and response bodies can be extended by arbitrary XML
elements, which can be ignored by the message recipient, an XML elements, which can be ignored by the message recipient, an XML
element in the "DAV:" namespace SHOULD NOT be used in the request or element in the "DAV:" namespace SHOULD NOT be used in the request or
response body unless that XML element is explicitly defined in an response body unless that XML element is explicitly defined in an
IETF RFC reviewed by a WebDAV working group. IETF RFC reviewed by a WebDAV working group.
For WebDAV to be both extensibile and backwards-compatible, both For WebDAV to be both extensible and backwards-compatible, both
clients and servers need to know how to behave when unexpected or clients and servers need to know how to behave when unexpected or
unrecognized command extensions are received. For XML processing, unrecognized command extensions are received. For XML processing,
this means that clients and servers MUST process received XML this means that clients and servers MUST process received XML
documents as if unexpected elements and attributes (and all children documents as if unexpected elements and attributes (and all children
of unrecognized elements) were not there. An unexpected element or of unrecognized elements) were not there. An unexpected element or
attribute includes one which may be used in another context but is attribute includes one that may be used in another context but is not
not expected here. Ignoring such items for purposes of processing expected here. Ignoring such items for purposes of processing can of
can of course be consistent with logging all information or course be consistent with logging all information or presenting for
presenting for debugging. debugging.
This restriction also applies to the processing, by clients, of DAV This restriction also applies to the processing, by clients, of DAV
property values where unexpected XML elements SHOULD be ignored property values where unexpected XML elements SHOULD be ignored
unless the property's schema declares otherwise. unless the property's schema declares otherwise.
This restriction does not apply to setting dead DAV properties on the This restriction does not apply to setting dead DAV properties on the
server where the server MUST record all XML elements. server where the server MUST record all XML elements.
Additionally, this restriction does not apply to the use of XML where Additionally, this restriction does not apply to the use of XML where
XML happens to be the content type of the entity body, for example, XML happens to be the content type of the entity body, for example,
skipping to change at page 112, line 25 skipping to change at page 102, line 45
extended to contain text, and vice versa. extended to contain text, and vice versa.
With DTD validation relaxed by the rules above, the constraints With DTD validation relaxed by the rules above, the constraints
described by the DTD fragments are normative (see for example described by the DTD fragments are normative (see for example
Appendix A). A recipient of a WebDAV message with an XML body MUST Appendix A). A recipient of a WebDAV message with an XML body MUST
NOT validate the XML document according to any hard-coded or NOT validate the XML document according to any hard-coded or
dynamically-declared DTD. dynamically-declared DTD.
Note that this section describes backwards-compatible extensibility Note that this section describes backwards-compatible extensibility
rules. There might also be times when an extension is designed not rules. There might also be times when an extension is designed not
to be backwards-compatible, for example defining an extension that to be backwards-compatible, for example, defining an extension that
reuses an XML element defined in this document but omitting one of reuses an XML element defined in this document but omitting one of
the child elements required by the DTDs in this specification. the child elements required by the DTDs in this specification.
18. DAV Compliance Classes 18. DAV Compliance Classes
A DAV compliant resource can advertise several classes of compliance. A DAV-compliant resource can advertise several classes of compliance.
A client can discover the compliance classes of a resource by A client can discover the compliance classes of a resource by
executing OPTIONS on the resource, and examining the "DAV" header executing OPTIONS on the resource and examining the "DAV" header
which is returned. Note particularly that resources are spoken of as which is returned. Note particularly that resources, rather than
being compliant, rather than servers. That is because theoretically servers, are spoken of as being compliant. That is because
some resources on a server could support different feature sets. theoretically some resources on a server could support different
E.g. a server could have a sub-repository where an advanced feature feature sets. For example, a server could have a sub-repository
like versioning was supported, even if that feature was not supported where an advanced feature like versioning was supported, even if that
on all sub-repositories. feature was not supported on all sub-repositories.
Since this document describes extensions to the HTTP/1.1 protocol, Since this document describes extensions to the HTTP/1.1 protocol,
minimally all DAV compliant resources, clients, and proxies MUST be minimally all DAV-compliant resources, clients, and proxies MUST be
compliant with [RFC2616]. compliant with [RFC2616].
A resource that is class 2 or class 3 compliant must also be class 1 A resource that is class 2 or class 3 compliant must also be class 1
compliant. compliant.
18.1. Class 1 18.1. Class 1
A class 1 compliant resource MUST meet all "MUST" requirements in all A class 1 compliant resource MUST meet all "MUST" requirements in all
sections of this document. sections of this document.
Class 1 compliant resources MUST return, at minimum, the value "1" in Class 1 compliant resources MUST return, at minimum, the value "1" in
the DAV header on all responses to the OPTIONS method. the DAV header on all responses to the OPTIONS method.
18.2. Class 2 18.2. Class 2
A class 2 compliant resource MUST meet all class 1 requirements and A class 2 compliant resource MUST meet all class 1 requirements and
support the LOCK method, the DAV:supportedlock property, the DAV: support the LOCK method, the DAV:supportedlock property, the DAV:
lockdiscovery property, the Time-Out response header and the Lock- lockdiscovery property, the Time-Out response header and the Lock-
Token request header. A class "2" compliant resource SHOULD also Token request header. A class 2 compliant resource SHOULD also
support the Time-Out request header and the 'owner' XML element. support the Timeout request header and the 'owner' XML element.
Class 2 compliant resources MUST return, at minimum, the values "1" Class 2 compliant resources MUST return, at minimum, the values "1"
and "2" in the DAV header on all responses to the OPTIONS method. and "2" in the DAV header on all responses to the OPTIONS method.
18.3. Class 3 18.3. Class 3
A resource can explicitly advertise its support for the revisions to A resource can explicitly advertise its support for the revisions to
[RFC2518] made in this document. Class 1 MUST be supported as well. [RFC2518] made in this document. Class 1 MUST be supported as well.
Class 2 MAY be supported. Advertising class 3 support in addition to Class 2 MAY be supported. Advertising class 3 support in addition to
class 1 and 2 means that the server supports all the requirements in class 1 and 2 means that the server supports all the requirements in
skipping to change at page 115, line 14 skipping to change at page 104, line 18
19. Internationalization Considerations 19. Internationalization Considerations
In the realm of internationalization, this specification complies In the realm of internationalization, this specification complies
with the IETF Character Set Policy [RFC2277]. In this specification, with the IETF Character Set Policy [RFC2277]. In this specification,
human-readable fields can be found either in the value of a property, human-readable fields can be found either in the value of a property,
or in an error message returned in a response entity body. In both or in an error message returned in a response entity body. In both
cases, the human-readable content is encoded using XML, which has cases, the human-readable content is encoded using XML, which has
explicit provisions for character set tagging and encoding, and explicit provisions for character set tagging and encoding, and
requires that XML processors read XML elements encoded, at minimum, requires that XML processors read XML elements encoded, at minimum,
using the UTF-8 [RFC3629] and UTF-16 encodings of the ISO 10646 using the UTF-8 [RFC3629] and UTF-16 [RFC2781] encodings of the ISO
multilingual plane. XML examples in this specification demonstrate 10646 multilingual plane. XML examples in this specification
use of the charset parameter of the Content-Type header, as defined demonstrate use of the charset parameter of the Content-Type header
in [RFC3023], as well as the XML declarations which provide charset (defined in [RFC3023]), as well as XML charset declarations.
identification information for MIME and XML processors.
XML also provides a language tagging capability for specifying the XML also provides a language tagging capability for specifying the
language of the contents of a particular XML element. The "xml:lang" language of the contents of a particular XML element. The "xml:lang"
attribute appears on an XML element to identify the language of its attribute appears on an XML element to identify the language of its
content and attributes. See [REC-XML] for definitions of values and content and attributes. See [REC-XML] for definitions of values and
scoping. scoping.
WebDAV applications MUST support the character set tagging, character WebDAV applications MUST support the character set tagging, character
set encoding, and the language tagging functionality of the XML set encoding, and the language tagging functionality of the XML
specification. Implementors of WebDAV applications are strongly specification. Implementors of WebDAV applications are strongly
encouraged to read "XML Media Types" [RFC3023] for instruction on encouraged to read "XML Media Types" [RFC3023] for instruction on
which MIME media type to use for XML transport, and on use of the which MIME media type to use for XML transport, and on use of the
charset parameter of the Content-Type header. charset parameter of the Content-Type header.
Names used within this specification fall into four categories: names Names used within this specification fall into four categories: names
of protocol elements such as methods and headers, names of XML of protocol elements such as methods and headers, names of XML
elements, names of properties, and names of conditions. Naming of elements, names of properties, and names of conditions. Naming of
protocol elements follows the precedent of HTTP, using English names protocol elements follows the precedent of HTTP, using English names
encoded in USASCII for methods and headers. Since these protocol encoded in US-ASCII for methods and headers. Since these protocol
elements are not visible to users, and are simply long token elements are not visible to users, and are simply long token
identifiers, they do not need to support multiple languages. identifiers, they do not need to support multiple languages.
Similarly, the names of XML elements used in this specification are Similarly, the names of XML elements used in this specification are
not visible to the user and hence do not need to support multiple not visible to the user and hence do not need to support multiple
languages. languages.
WebDAV property names are qualified XML names (pairs of XML namespace WebDAV property names are qualified XML names (pairs of XML namespace
name and local name). Although some applications (e.g., a generic name and local name). Although some applications (e.g., a generic
property viewer) will display property names directly to their users, property viewer) will display property names directly to their users,
it is expected that the typical application will use a fixed set of it is expected that the typical application will use a fixed set of
skipping to change at page 117, line 42 skipping to change at page 106, line 10
authentication challenge in a WWW-Authenticate header unless the authentication challenge in a WWW-Authenticate header unless the
connection is secure. An example of a secure connection would be a connection is secure. An example of a secure connection would be a
Transport Layer Security (TLS) connection employing a strong cipher Transport Layer Security (TLS) connection employing a strong cipher
suite and server authentication. suite and server authentication.
WebDAV applications MUST support the Digest authentication scheme WebDAV applications MUST support the Digest authentication scheme
[RFC2617]. Since Digest authentication verifies that both parties to [RFC2617]. Since Digest authentication verifies that both parties to
a communication know a shared secret, a password, without having to a communication know a shared secret, a password, without having to
send that secret in the clear, Digest authentication avoids the send that secret in the clear, Digest authentication avoids the
security problems inherent in Basic authentication while providing a security problems inherent in Basic authentication while providing a
level of authentication which is useful in a wide range of scenarios. level of authentication that is useful in a wide range of scenarios.
20.2. Denial of Service 20.2. Denial of Service
Denial of service attacks are of special concern to WebDAV servers. Denial-of-service attacks are of special concern to WebDAV servers.
WebDAV plus HTTP enables denial of service attacks on every part of a WebDAV plus HTTP enables denial-of-service attacks on every part of a
system's resources. system's resources.
o The underlying storage can be attacked by PUTting extremely large o The underlying storage can be attacked by PUTting extremely large
files. files.
o Asking for recursive operations on large collections can attack o Asking for recursive operations on large collections can attack
processing time. processing time.
o Making multiple pipelined requests on multiple connections can o Making multiple pipelined requests on multiple connections can
attack network connections. attack network connections.
WebDAV servers need to be aware of the possibility of a denial of WebDAV servers need to be aware of the possibility of a denial-of-
service attack at all levels. The proper response to such an attack service attack at all levels. The proper response to such an attack
MAY be to simply drop the connection, or if the server is able to MAY be to simply drop the connection. Or, if the server is able to
make a response, the server MAY use a 400-level status request such make a response, the server MAY use a 400-level status request such
as 400 (Bad Request) and indicate why the request was refused (a 500- as 400 (Bad Request) and indicate why the request was refused (a 500-
level status response would indicate that the problem is with the level status response would indicate that the problem is with the
server, whereas unintentional DOS attacks are something the client is server, whereas unintentional DoS attacks are something the client is
capable of remedying). capable of remedying).
20.3. Security through Obscurity 20.3. Security through Obscurity
WebDAV provides, through the PROPFIND method, a mechanism for listing WebDAV provides, through the PROPFIND method, a mechanism for listing
the member resources of a collection. This greatly diminishes the the member resources of a collection. This greatly diminishes the
effectiveness of security or privacy techniques that rely only on the effectiveness of security or privacy techniques that rely only on the
difficulty of discovering the names of network resources. Users of difficulty of discovering the names of network resources. Users of
WebDAV servers are encouraged to use access control techniques to WebDAV servers are encouraged to use access control techniques to
prevent unwanted access to resources, rather than depending on the prevent unwanted access to resources, rather than depending on the
relative obscurity of their resource names. relative obscurity of their resource names.
20.4. Privacy Issues Connected to Locks 20.4. Privacy Issues Connected to Locks
When submitting a lock request a user agent may also submit an When submitting a lock request, a user agent may also submit an
'owner' XML field giving contact information for the person taking 'owner' XML field giving contact information for the person taking
out the lock (for those cases where a person, rather than a robot, is out the lock (for those cases where a person, rather than a robot, is
taking out the lock). This contact information is stored in a DAV: taking out the lock). This contact information is stored in a DAV:
lockdiscovery property on the resource, and can be used by other lockdiscovery property on the resource, and can be used by other
collaborators to begin negotiation over access to the resource. collaborators to begin negotiation over access to the resource.
However, in many cases this contact information can be very private, However, in many cases, this contact information can be very private,
and should not be widely disseminated. Servers SHOULD limit read and should not be widely disseminated. Servers SHOULD limit read
access to the DAV:lockdiscovery property as appropriate. access to the DAV:lockdiscovery property as appropriate.
Furthermore, user agents SHOULD provide control over whether contact Furthermore, user agents SHOULD provide control over whether contact
information is sent at all, and if contact information is sent, information is sent at all, and if contact information is sent,
control over exactly what information is sent. control over exactly what information is sent.
20.5. Privacy Issues Connected to Properties 20.5. Privacy Issues Connected to Properties
Since property values are typically used to hold information such as Since property values are typically used to hold information such as
the author of a document, there is the possibility that privacy the author of a document, there is the possibility that privacy
skipping to change at page 119, line 11 skipping to change at page 107, line 27
property data. To reduce the risk of inadvertent release of private property data. To reduce the risk of inadvertent release of private
information via properties, servers are encouraged to develop access information via properties, servers are encouraged to develop access
control mechanisms that separate read access to the resource body and control mechanisms that separate read access to the resource body and
read access to the resource's properties. This allows a user to read access to the resource's properties. This allows a user to
control the dissemination of their property data without overly control the dissemination of their property data without overly
restricting access to the resource's contents. restricting access to the resource's contents.
20.6. Implications of XML Entities 20.6. Implications of XML Entities
XML supports a facility known as "external entities", defined in XML supports a facility known as "external entities", defined in
Section 4.2.2 of [REC-XML], which instruct an XML processor to Section 4.2.2 of [REC-XML], which instructs an XML processor to
retrieve and include additional XML. An external XML entity can be retrieve and include additional XML. An external XML entity can be
used to append or modify the document type declaration (DTD) used to append or modify the document type declaration (DTD)
associated with an XML document. An external XML entity can also be associated with an XML document. An external XML entity can also be
used to include XML within the content of an XML document. For non- used to include XML within the content of an XML document. For non-
validating XML, such as the XML used in this specification, including validating XML, such as the XML used in this specification, including
an external XML entity is not required by XML. However, XML does an external XML entity is not required by XML. However, XML does
state that an XML processor may, at its discretion, include the state that an XML processor may, at its discretion, include the
external XML entity. external XML entity.
External XML entities have no inherent trustworthiness and are External XML entities have no inherent trustworthiness and are
subject to all the attacks that are endemic to any HTTP GET request. subject to all the attacks that are endemic to any HTTP GET request.
Furthermore, it is possible for an external XML entity to modify the Furthermore, it is possible for an external XML entity to modify the
DTD, and hence affect the final form of an XML document, in the worst DTD, and hence affect the final form of an XML document, in the worst
case significantly modifying its semantics, or exposing the XML case, significantly modifying its semantics or exposing the XML
processor to the security risks discussed in [RFC3023]. Therefore, processor to the security risks discussed in [RFC3023]. Therefore,
implementers must be aware that external XML entities should be implementers must be aware that external XML entities should be
treated as untrustworthy. If a server implementor chooses not to treated as untrustworthy. If a server chooses not to handle external
handle external XML entities, it SHOULD respond to requests XML entities, it SHOULD respond to requests containing external
containing external entities with the 'no-external-entities' entities with the 'no-external-entities' condition code.
condition code.
There is also the scalability risk that would accompany a widely There is also the scalability risk that would accompany a widely
deployed application which made use of external XML entities. In deployed application that made use of external XML entities. In this
this situation, it is possible that there would be significant situation, it is possible that there would be significant numbers of
numbers of requests for one external XML entity, potentially requests for one external XML entity, potentially overloading any
overloading any server which fields requests for the resource server that fields requests for the resource containing the external
containing the external XML entity. XML entity.
Furthermore, there's also a risk based on the evaluation of "internal Furthermore, there's also a risk based on the evaluation of "internal
entities" as defined in Section 4.2.2 of [REC-XML]. A small, entities" as defined in Section 4.2.2 of [REC-XML]. A small,
carefully crafted request using nested internal entities may require carefully crafted request using nested internal entities may require
enormous amounts of memory and/or processing time to process. Server enormous amounts of memory and/or processing time to process. Server
implementors should be aware of this risk and configure their XML implementers should be aware of this risk and configure their XML
parsers so that requests like these can be detected and rejected as parsers so that requests like these can be detected and rejected as
early as possible. early as possible.
20.7. Risks Connected with Lock Tokens 20.7. Risks Connected with Lock Tokens
This specification encourages the use of "A Universally Unique This specification encourages the use of "A Universally Unique
Identifier (UUID) URN Namespace" ([RFC4122]) for lock tokens Identifier (UUID) URN Namespace" ([RFC4122]) for lock tokens
(Section 6.5), in order to guarantee their uniqueness across space (Section 6.5), in order to guarantee their uniqueness across space
and time. Version 1 UUIDs (defined in Section 4) MAY contain a and time. Version 1 UUIDs (defined in Section 4) MAY contain a
"node" field that "consists of an IEEE 802 MAC address, usually the "node" field that "consists of an IEEE 802 MAC address, usually the
skipping to change at page 120, line 24 skipping to change at page 108, line 39
o It is possible to track the movement of hardware from subnet to o It is possible to track the movement of hardware from subnet to
subnet. subnet.
o It may be possible to identify the manufacturer of the hardware o It may be possible to identify the manufacturer of the hardware
running a WebDAV server. running a WebDAV server.
o It may be possible to determine the number of each type of o It may be possible to determine the number of each type of
computer running WebDAV. computer running WebDAV.
This risk only applies to host address based UUID versions. Section This risk only applies to host-address-based UUID versions. Section
4 of [RFC4122] describes several other mechanisms for generating 4 of [RFC4122] describes several other mechanisms for generating
UUIDs that do not involve the host address and therefore do not UUIDs that do not involve the host address and therefore do not
suffer from this risk. suffer from this risk.
20.8. Hosting Malicious Content 20.8. Hosting Malicious Content
HTTP has the ability to host programs which are executed on client HTTP has the ability to host programs that are executed on client
machines. These programs can take many forms including web scripts, machines. These programs can take many forms including Web scripts,
executables, plug in modules, and macros in documents. WebDAV does executables, plug-in modules, and macros in documents. WebDAV does
not change any of the security concerns around these programs yet not change any of the security concerns around these programs, yet
often WebDAV is used in contexts where a wide range of users can often WebDAV is used in contexts where a wide range of users can
publish documents on a server. The server might not have a close publish documents on a server. The server might not have a close
trust relationship with the author that is publishing the document. trust relationship with the author that is publishing the document.
Servers that allow clients to publish arbitrary content can usefully Servers that allow clients to publish arbitrary content can usefully
implement precautions to check that content published to the server implement precautions to check that content published to the server
is not harmful to other clients. Servers could do this by techniques is not harmful to other clients. Servers could do this by techniques
such as restricting the types of content that is allowed to be such as restricting the types of content that is allowed to be
published and running virus and malware detection software on published and running virus and malware detection software on
published content. Servers can also mitigate the risk by having published content. Servers can also mitigate the risk by having
appropriate access restriction and authentication of users that are appropriate access restriction and authentication of users that are
skipping to change at page 121, line 28 skipping to change at page 109, line 37
Note that defining new URI schemes for XML namespaces is now Note that defining new URI schemes for XML namespaces is now
discouraged. "DAV:" was defined before standard best practices discouraged. "DAV:" was defined before standard best practices
emerged. emerged.
21.2. XML Namespaces 21.2. XML Namespaces
XML namespaces disambiguate WebDAV property names and XML elements. XML namespaces disambiguate WebDAV property names and XML elements.
Any WebDAV user or application can define a new namespace in order to Any WebDAV user or application can define a new namespace in order to
create custom properties or extend WebDAV XML syntax. IANA does not create custom properties or extend WebDAV XML syntax. IANA does not
need to manage such namespaces, property names or element names. need to manage such namespaces, property names, or element names.
21.3. Message Header Fields 21.3. Message Header Fields
The message header fields below should be added to the permanent The message header fields below should be added to the permanent
registry (see [RFC3864]). registry (see [RFC3864]).
21.3.1. DAV 21.3.1. DAV
Header field name: DAV Header field name: DAV
skipping to change at page 124, line 5 skipping to change at page 111, line 32
Header field name: Timeout Header field name: Timeout
Applicable protocol: http Applicable protocol: http
Status: standard Status: standard
Author/Change controller: IETF Author/Change controller: IETF
Specification document: this specification (Section 10.7) Specification document: this specification (Section 10.7)
21.4. HTTP Status Codes
This specification defines the HTTP status codes
o 207 Multi-Status (Section 11.1)
o 422 Unprocessable Entity (Section 11.2),
o 423 Locked (Section 11.3),
o 424 Failed Dependency (Section 11.4) and
o 507 Insufficient Storage (Section 11.5),
to be updated in the registry at
<http://www.iana.org/assignments/http-status-codes>.
Note: the HTTP status code 102 (Processing) has been removed in this
specification; its IANA registration should continue to reference RFC
2518.
22. Acknowledgements 22. Acknowledgements
A specification such as this thrives on piercing critical review and A specification such as this thrives on piercing critical review and
withers from apathetic neglect. The authors gratefully acknowledge withers from apathetic neglect. The authors gratefully acknowledge
the contributions of the following people, whose insights were so the contributions of the following people, whose insights were so
valuable at every stage of our work. valuable at every stage of our work.
Contributors to RFC2518 Contributors to RFC2518
Terry Allen, Harald Alvestrand, Jim Amsden, Becky Anderson, Alan Terry Allen, Harald Alvestrand, Jim Amsden, Becky Anderson, Alan
skipping to change at page 124, line 30 skipping to change at page 112, line 30
Hamilton, Steve Henning, Mead Himelstein, Alex Hopmann, Andre van der Hamilton, Steve Henning, Mead Himelstein, Alex Hopmann, Andre van der
Hoek, Ben Laurie, Paul Leach, Ora Lassila, Karen MacArthur, Steven Hoek, Ben Laurie, Paul Leach, Ora Lassila, Karen MacArthur, Steven
Martin, Larry Masinter, Michael Mealling, Keith Moore, Thomas Narten, Martin, Larry Masinter, Michael Mealling, Keith Moore, Thomas Narten,
Henrik Nielsen, Kenji Ota, Bob Parker, Glenn Peterson, Jon Radoff, Henrik Nielsen, Kenji Ota, Bob Parker, Glenn Peterson, Jon Radoff,
Saveen Reddy, Henry Sanders, Christopher Seiwald, Judith Slein, Mike Saveen Reddy, Henry Sanders, Christopher Seiwald, Judith Slein, Mike
Spreitzer, Einar Stefferud, Greg Stein, Ralph Swick, Kenji Takahashi, Spreitzer, Einar Stefferud, Greg Stein, Ralph Swick, Kenji Takahashi,
Richard N. Taylor, Robert Thau, John Turner, Sankar Virdhagriswaran, Richard N. Taylor, Robert Thau, John Turner, Sankar Virdhagriswaran,
Fabio Vitali, Gregory Woodhouse, and Lauren Wood. Fabio Vitali, Gregory Woodhouse, and Lauren Wood.
Two from this list deserve special mention. The contributions by Two from this list deserve special mention. The contributions by
Larry Masinter have been invaluable, both in helping the formation of Larry Masinter have been invaluable; he both helped the formation of
the working group and in patiently coaching the authors along the the working group and patiently coached the authors along the way.
way. In so many ways he has set high standards we have toiled to In so many ways he has set high standards that we have toiled to
meet. The contributions of Judith Slein in clarifying the meet. The contributions of Judith Slein were also invaluable; by
requirements, and in patiently reviewing draft after draft, both clarifying the requirements and in patiently reviewing version after
improved this specification and expanded our minds on document version, she both improved this specification and expanded our minds
management. on document management.
We would also like to thank John Turner for developing the XML DTD. We would also like to thank John Turner for developing the XML DTD.
The authors of RFC2518 were Yaron Goland, Jim Whitehead, A. Faizi, The authors of RFC2518 were Yaron Goland, Jim Whitehead, A. Faizi,
Steve Carter and D. Jensen. Although their names had to be removed Steve Carter, and D. Jensen. Although their names had to be removed
due to IETF author count restrictions they can take credit for the due to IETF author count restrictions, they can take credit for the
majority of the design of WebDAV. majority of the design of WebDAV.
Additional Acknowledgements for This Specification Additional Acknowledgements for This Specification
Significant contributors of text for this specification are listed as Significant contributors of text for this specification are listed as
contributors in the section below. We must also gratefully contributors in the section below. We must also gratefully
acknowledge Geoff Clemm, Joel Soderberg, and Dan Brotsky for hashing acknowledge Geoff Clemm, Joel Soderberg, and Dan Brotsky for hashing
out specific text on the list or in meetings. Joe Hildebrand and out specific text on the list or in meetings. Joe Hildebrand and
Cullen Jennings helped close many issues. Barry Lind described an Cullen Jennings helped close many issues. Barry Lind described an
additional security consideration and Cullen Jennings provided text additional security consideration and Cullen Jennings provided text
for that consideration. Jason Crawford tracked issue status for this for that consideration. Jason Crawford tracked issue status for this
document for a period of years, followed by Elias Sinderson. document for a period of years, followed by Elias Sinderson.
23. Contributors to This Specification 23. Contributors to This Specification
Julian Reschke, Julian Reschke
<green/>bytes GmbH, <green/>bytes GmbH
Hafenweg 16, 48155 Muenster, Germany, Hafenweg 16, 48155 Muenster, Germany
Email: julian.reschke@greenbytes.de EMail: julian.reschke@greenbytes.de
Elias Sinderson Elias Sinderson
University of California, Santa Cruz University of California, Santa Cruz
1156 High Street, Santa Cruz, CA 95064 1156 High Street, Santa Cruz, CA 95064
Email: elias@cse.ucsc.edu EMail: elias@cse.ucsc.edu
Jim Whitehead, Jim Whitehead
University of California, Santa Cruz University of California, Santa Cruz
1156 High Street, Santa Cruz, CA 95064 1156 High Street, Santa Cruz, CA 95064
Email: ejw@soe.ucsc.edu EMail: ejw@soe.ucsc.edu
24. Authors of RFC2518 24. Authors of RFC2518
Y. Y. Goland, Y. Y. Goland
Microsoft Corporation, Microsoft Corporation
One Microsoft Way, One Microsoft Way
Redmond, WA 98052-6399. Redmond, WA 98052-6399
Email: yarong@microsoft.com. EMail: yarong@microsoft.com
E. J. Whitehead, Jr.,
Dept. Of Information and Computer Science,
University of California, Irvine,
Irvine, CA 92697-3425.
Email: ejw@ics.uci.edu.
A. Faizi, E. J. Whitehead, Jr.
Netscape, Dept. Of Information and Computer Science
685 East Middlefield Road, University of California, Irvine
Mountain View, CA 94043. Irvine, CA 92697-3425
Email: asad@netscape.com. EMail: ejw@ics.uci.edu
S. R. Carter, A. Faizi
Novell, Netscape
1555 N. Technology Way, 685 East Middlefield Road
M/S ORM F111, Mountain View, CA 94043
Orem, UT 84097-2399. EMail: asad@netscape.com
Email: srcarter@novell.com. S. R. Carter
Novell
1555 N. Technology Way
M/S ORM F111
Orem, UT 84097-2399
EMail: srcarter@novell.com
D. Jensen, D. Jensen
Novell, Novell
1555 N. Technology Way, 1555 N. Technology Way
M/S ORM F111, M/S ORM F111
Orem, UT 84097-2399. Orem, UT 84097-2399
Email: dcjensen@novell.com. EMail: dcjensen@novell.com
25. References 25. References
25.1. Normative References 25.1. Normative References
[REC-XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and [REC-XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler,
F. Yergeau, "Extensible Markup Language (XML) 1.0 (Third E., and F. Yergeau, "Extensible Markup Language
Edition)", W3C REC-xml-20040204, February 2004, (XML) 1.0 (Fourth Edition)", W3C REC-xml-20060816,
<http://www.w3.org/TR/2004/REC-xml-20040204>. August 2006,
<http://www.w3.org/TR/2006/REC-xml-20060816/>.
[REC-XML-INFOSET] [REC-XML-INFOSET] Cowan, J. and R. Tobin, "XML Information Set
Cowan, J. and R. Tobin, "XML Information Set (Second (Second Edition)", W3C REC-xml-infoset-20040204,
Edition)", W3C REC-xml-infoset-20040204, February 2004, February 2004, <http://www.w3.org/TR/2004/
<http://www.w3.org/TR/2004/REC-xml-infoset-20040204/>. REC-xml-infoset-20040204/>.
[REC-XML-NAMES] [REC-XML-NAMES] Bray, T., Hollander, D., Layman, A., and R. Tobin,
Bray, T., Hollander, D., and A. Layman, "Namespaces in "Namespaces in XML 1.0 (Second Edition)", W3C REC-
XML", W3C REC-xml-names-19990114, January 1999, xml-names-20060816, August 2006, <http://
<http://www.w3.org/TR/1999/REC-xml-names-19990114>. www.w3.org/TR/2006/REC-xml-names-20060816/>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to
Requirement Levels", BCP 14, RFC 2119, March 1997. Indicate Requirement Levels", BCP 14, RFC 2119,
March 1997.
[RFC2277] Alvestrand, H., "IETF Policy on Character Sets and [RFC2277] Alvestrand, H., "IETF Policy on Character Sets and
Languages", BCP 18, RFC 2277, January 1998. Languages", BCP 18, RFC 2277, January 1998.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Masinter, L., Leach, P., and T. Berners-Lee,
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. "Hypertext Transfer Protocol -- HTTP/1.1",
RFC 2616, June 1999.
[RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J.,
Leach, P., Luotonen, A., and L. Stewart, "HTTP Lawrence, S., Leach, P., Luotonen, A., and L.
Authentication: Basic and Digest Access Authentication", Stewart, "HTTP Authentication: Basic and Digest
RFC 2617, June 1999. Access Authentication", RFC 2617, June 1999.
[RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on the [RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on
Internet: Timestamps", RFC 3339, July 2002. the Internet: Timestamps", RFC 3339, July 2002.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO [RFC3629] Yergeau, F., "UTF-8, a transformation format of
10646", STD 63, RFC 3629, November 2003. ISO 10646", STD 63, RFC 3629, November 2003.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter,
Resource Identifier (URI): Generic Syntax", STD 66, "Uniform Resource Identifier (URI): Generic
RFC 3986, January 2005. Syntax", STD 66, RFC 3986, January 2005.
[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally [RFC4122] Leach, P., Mealling, M., and R. Salz, "A
Unique IDentifier (UUID) URN Namespace", RFC 4122, Universally Unique IDentifier (UUID) URN
July 2005. Namespace", RFC 4122, July 2005.
25.2. Informational References 25.2. Informative References
[RFC2291] Slein, J., Vitali, F., Whitehead, E., and D. Durand, [RFC2291] Slein, J., Vitali, F., Whitehead, E., and D.
"Requirements for a Distributed Authoring and Versioning Durand, "Requirements for a Distributed Authoring
Protocol for the World Wide Web", RFC 2291, February 1998. and Versioning Protocol for the World Wide Web",
RFC 2291, February 1998.
[RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D. [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S.,
Jensen, "HTTP Extensions for Distributed Authoring -- and D. Jensen, "HTTP Extensions for Distributed
WEBDAV", RFC 2518, February 1999. Authoring -- WEBDAV", RFC 2518, February 1999.
[RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media [RFC2781] Hoffman, P. and F. Yergeau, "UTF-16, an encoding
Types", RFC 3023, January 2001. of ISO 10646", RFC 2781, February 2000.
[RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J. [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML
Whitehead, "Versioning Extensions to WebDAV (Web Media Types", RFC 3023, January 2001.
Distributed Authoring and Versioning)", RFC 3253,
March 2002.
[RFC3648] Whitehead, J. and J. Reschke, Ed., "Web Distributed [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and
Authoring and Versioning (WebDAV) Ordered Collections J. Whitehead, "Versioning Extensions to WebDAV
Protocol", RFC 3648, December 2003. (Web Distributed Authoring and Versioning)",
RFC 3253, March 2002.
[RFC3744] Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web [RFC3648] Whitehead, J. and J. Reschke, Ed., "Web
Distributed Authoring and Versioning (WebDAV) Access Distributed Authoring and Versioning (WebDAV)
Control Protocol", RFC 3744, May 2004. Ordered Collections Protocol", RFC 3648,
December 2003.
[RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration [RFC3744] Clemm, G., Reschke, J., Sedlar, E., and J.
Procedures for Message Header Fields", BCP 90, RFC 3864, Whitehead, "Web Distributed Authoring and
September 2004. Versioning (WebDAV) Access Control Protocol",
RFC 3744, May 2004.
[RFC3864] Klyne, G., Nottingham, M., and J. Mogul,
"Registration Procedures for Message Header
Fields", BCP 90, RFC 3864, September 2004.
Appendix A. Notes on Processing XML Elements Appendix A. Notes on Processing XML Elements
A.1. Notes on Empty XML Elements A.1. Notes on Empty XML Elements
XML supports two mechanisms for indicating that an XML element does XML supports two mechanisms for indicating that an XML element does
not have any content. The first is to declare an XML element of the not have any content. The first is to declare an XML element of the
form <A></A>. The second is to declare an XML element of the form form <A></A>. The second is to declare an XML element of the form
<A/>. The two XML elements are semantically identical. <A/>. The two XML elements are semantically identical.
skipping to change at page 130, line 25 skipping to change at page 117, line 25
XML is a flexible data format that makes it easy to submit data that XML is a flexible data format that makes it easy to submit data that
appears legal but in fact is not. The philosophy of "Be flexible in appears legal but in fact is not. The philosophy of "Be flexible in
what you accept and strict in what you send" still applies, but it what you accept and strict in what you send" still applies, but it
must not be applied inappropriately. XML is extremely flexible in must not be applied inappropriately. XML is extremely flexible in
dealing with issues of white space, element ordering, inserting new dealing with issues of white space, element ordering, inserting new
elements, etc. This flexibility does not require extension, elements, etc. This flexibility does not require extension,
especially not in the area of the meaning of elements. especially not in the area of the meaning of elements.
There is no kindness in accepting illegal combinations of XML There is no kindness in accepting illegal combinations of XML
elements. At best it will cause an unwanted result and at worst it elements. At best, it will cause an unwanted result and at worst it
can cause real damage. can cause real damage.
A.3. Example - XML Syntax Error A.3. Example - XML Syntax Error
The following request body for a PROPFIND method is illegal. The following request body for a PROPFIND method is illegal.
<?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:allprop/> <D:allprop/>
<D:propname/> <D:propname/>
</D:propfind> </D:propfind>
The definition of the propfind element only allows for the allprop or The definition of the propfind element only allows for the allprop or
the propname element, not both. Thus the above is an error and must the propname element, not both. Thus, the above is an error and must
be responded to with a 400 (Bad Request). be responded to with a 400 (Bad Request).
Imagine, however, that a server wanted to be "kind" and decided to Imagine, however, that a server wanted to be "kind" and decided to
pick the allprop element as the true element and respond to it. A pick the allprop element as the true element and respond to it. A
client running over a bandwidth limited line who intended to execute client running over a bandwidth limited line who intended to execute
a propname would be in for a big surprise if the server treated the a propname would be in for a big surprise if the server treated the
command as an allprop. command as an allprop.
Additionally, if a server were lenient and decided to reply to this Additionally, if a server were lenient and decided to reply to this
request, the results would vary randomly from server to server, with request, the results would vary randomly from server to server, with
skipping to change at page 131, line 21 skipping to change at page 118, line 21
request body of a PROPFIND and, like the previous example, must be request body of a PROPFIND and, like the previous example, must be
rejected with a 400 (Bad Request) by a server that does not rejected with a 400 (Bad Request) by a server that does not
understand the expired-props element. understand the expired-props element.
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:" <D:propfind xmlns:D="DAV:"
xmlns:E="http://www.example.com/standards/props/"> xmlns:E="http://www.example.com/standards/props/">
<E:expired-props/> <E:expired-props/>
</D:propfind> </D:propfind>
To understand why a 400 (Bad Request) is returned let us look at the To understand why a 400 (Bad Request) is returned, let us look at the
request body as the server unfamiliar with expired-props sees it. request body as the server unfamiliar with expired-props sees it.
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:" <D:propfind xmlns:D="DAV:"
xmlns:E="http://www.example.com/standards/props/"> xmlns:E="http://www.example.com/standards/props/">
</D:propfind> </D:propfind>
As the server does not understand the 'expired-props' element, As the server does not understand the 'expired-props' element,
according to the WebDAV-specific XML processing rules specified in according to the WebDAV-specific XML processing rules specified in
Section 17, it must process the request as if the element were not Section 17, it must process the request as if the element were not
there. Thus the server sees an empty propfind, which by the there. Thus, the server sees an empty propfind, which by the
definition of the propfind element is illegal. definition of the propfind element is illegal.
Please note that had the extension been additive it would not Please note that had the extension been additive, it would not
necessarily have resulted in a 400 (Bad Request). For example, necessarily have resulted in a 400 (Bad Request). For example,
imagine the following request body for a PROPFIND: imagine the following request body for a PROPFIND:
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:" <D:propfind xmlns:D="DAV:"
xmlns:E="http://www.example.com/standards/props/"> xmlns:E="http://www.example.com/standards/props/">
<D:propname/> <D:propname/>
<E:leave-out>*boss*</E:leave-out> <E:leave-out>*boss*</E:leave-out>
</D:propfind> </D:propfind>
skipping to change at page 132, line 18 skipping to change at page 119, line 18
compatible with HTTP 1.1. The PUT and DELETE methods are defined in compatible with HTTP 1.1. The PUT and DELETE methods are defined in
HTTP and thus may be used by HTTP clients as well as WebDAV-aware HTTP and thus may be used by HTTP clients as well as WebDAV-aware
clients, but the responses to PUT and DELETE have been extended in clients, but the responses to PUT and DELETE have been extended in
this specification in ways that only a WebDAV client would be this specification in ways that only a WebDAV client would be
entirely prepared for. Some theoretical concerns were raised about entirely prepared for. Some theoretical concerns were raised about
whether those responses would cause interoperability problems with whether those responses would cause interoperability problems with
HTTP-only clients, and this section addresses those concerns. HTTP-only clients, and this section addresses those concerns.
Since any HTTP client ought to handle unrecognized 400-level and 500- Since any HTTP client ought to handle unrecognized 400-level and 500-
level status codes as errors, the following new status codes should level status codes as errors, the following new status codes should
not present any issues: 422, 423 and 507 (424 is also a new status not present any issues: 422, 423, and 507 (424 is also a new status
code but it appears only in the body of a Multistatus response.) So, code but it appears only in the body of a Multistatus response.) So,
for example, if a HTTP client attempted to PUT or DELETE a locked for example, if an HTTP client attempted to PUT or DELETE a locked
resource, the 423 Locked response ought to result in a generic error resource, the 423 Locked response ought to result in a generic error
presented to the user. presented to the user.
The 207 Multistatus response is interesting because a HTTP client The 207 Multistatus response is interesting because an HTTP client
issuing a DELETE request to a collection might interpret a 207 issuing a DELETE request to a collection might interpret a 207
response as a success, even though it does not realize the resource response as a success, even though it does not realize the resource
is a collection and cannot understand that the DELETE operation might is a collection and cannot understand that the DELETE operation might
have been a complete or partial failure. That interpretation isn't have been a complete or partial failure. That interpretation isn't
entirely justified, because a 200-level response indicates that the entirely justified, because a 200-level response indicates that the
server "received, understood and accepted" the request, not that the server "received, understood, and accepted" the request, not that the
request resulted in complete success. request resulted in complete success.
One option is that a server could treat a DELETE of a collection as One option is that a server could treat a DELETE of a collection as
an atomic operation, and use either 204 No Content in case of an atomic operation, and use either 204 No Content in case of
success, or some appropriate error response (400 or 500 level) for an success, or some appropriate error response (400 or 500 level) for an
error. This approach would indeed maximize backward compatibility. error. This approach would indeed maximize backward compatibility.
However, since interoperability tests and working group discussions However, since interoperability tests and working group discussions
have not turned up any instances of HTTP clients issuing a DELETE have not turned up any instances of HTTP clients issuing a DELETE
request against a WebDAV collection, this concern is more theoretical request against a WebDAV collection, this concern is more theoretical
than practical. Thus, servers are likely to be completely successful than practical. Thus, servers are likely to be completely successful
at interoperating with HTTP clients even if they treat any collection at interoperating with HTTP clients even if they treat any collection
DELETE request as a WebDAV request and send a 207 Multistatus DELETE request as a WebDAV request and send a 207 Multi-Status
response. response.
In general server implementations are encouraged to use the detailed In general, server implementations are encouraged to use the detailed
responses and other mechanisms defined in this document rather than responses and other mechanisms defined in this document rather than
make changes for theoretical interoperability concerns. make changes for theoretical interoperability concerns.
Appendix C. The 'opaquelocktoken' Scheme and URIs Appendix C. The 'opaquelocktoken' Scheme and URIs
The 'opaquelocktoken' URI scheme was defined in [RFC2518] (and The 'opaquelocktoken' URI scheme was defined in [RFC2518] (and
registered by IANA) in order to create syntactically correct and registered by IANA) in order to create syntactically correct and
easy-to-generate URIs out of UUIDs, intended to be used as lock easy-to-generate URIs out of UUIDs, intended to be used as lock
tokens and to be unique across all resources for all time. tokens and to be unique across all resources for all time.
An opaquelocktoken URI is constructed by concatenating the An opaquelocktoken URI is constructed by concatenating the
'opaquelocktoken' scheme with a UUID, along with an optional 'opaquelocktoken' scheme with a UUID, along with an optional
extension. Servers can create new UUIDs for each new lock token. If extension. Servers can create new UUIDs for each new lock token. If
a server wishes to reuse UUIDs the server MUST add an extension and a server wishes to reuse UUIDs, the server MUST add an extension, and
the algorithm generating the extension MUST guarantee that the same the algorithm generating the extension MUST guarantee that the same
extension will never be used twice with the associated UUID. extension will never be used twice with the associated UUID.
OpaqueLockToken-URI = "opaquelocktoken:" UUID [Extension] OpaqueLockToken-URI = "opaquelocktoken:" UUID [Extension]
; UUID is defined in Section 3 of [RFC4122]. Note that LWS ; UUID is defined in Section 3 of [RFC4122]. Note that LWS
; is not allowed between elements of ; is not allowed between elements of
; this production. ; this production.
Extension = path Extension = path
; path is defined in Section 3.3 of [RFC3986] ; path is defined in Section 3.3 of [RFC3986]
skipping to change at page 134, line 28 skipping to change at page 120, line 50
o A lock-null resource sometimes appeared as "Not Found". The o A lock-null resource sometimes appeared as "Not Found". The
server responds with a 404 or 405 to any method except for PUT, server responds with a 404 or 405 to any method except for PUT,
MKCOL, OPTIONS, PROPFIND, LOCK, UNLOCK. MKCOL, OPTIONS, PROPFIND, LOCK, UNLOCK.
o A lock-null resource does however show up as a member of its o A lock-null resource does however show up as a member of its
parent collection. parent collection.
o The server removes the lock-null resource entirely (its URI o The server removes the lock-null resource entirely (its URI
becomes unmapped) if its lock goes away before it is converted to becomes unmapped) if its lock goes away before it is converted to
a regular resource. Recall that locks go away not only when they a regular resource. Recall that locks go away not only when they
expire or are unlcoked, but are also removed if a resource is expire or are unlocked, but are also removed if a resource is
renamed or moved, or if any parent collection is renamed or moved. renamed or moved, or if any parent collection is renamed or moved.
o The server converts the lock-null resource into a regular resource o The server converts the lock-null resource into a regular resource
if a PUT request to the URL is successful. if a PUT request to the URL is successful.
o The server converts the lock-null resource into a collection if a o The server converts the lock-null resource into a collection if a
MKCOL request to the URL is successful (though interoperability MKCOL request to the URL is successful (though interoperability
experience showed that not all servers followed this requirement). experience showed that not all servers followed this requirement).
o Property values were defined for DAV:lockdiscovery and DAV: o Property values were defined for DAV:lockdiscovery and DAV:
skipping to change at page 135, line 4 skipping to change at page 121, line 27
old model "lock-null resources" and the recommended model of "locked old model "lock-null resources" and the recommended model of "locked
empty resources" by only attempting PUT after a LOCK to an unmapped empty resources" by only attempting PUT after a LOCK to an unmapped
URL, not MKCOL or GET. URL, not MKCOL or GET.
D.1. Guidance for Clients Using LOCK to Create Resources D.1. Guidance for Clients Using LOCK to Create Resources
A WebDAV client implemented to this specification might find servers A WebDAV client implemented to this specification might find servers
that create lock-null resources (implemented before this that create lock-null resources (implemented before this
specification using [RFC2518]) as well as servers that create locked specification using [RFC2518]) as well as servers that create locked
empty resources. The response to the LOCK request will not indicate empty resources. The response to the LOCK request will not indicate
what kind of resource was created. There are a few techniques which what kind of resource was created. There are a few techniques that
help the client deal with either type. help the client deal with either type.
If the client wishes to avoid accidentally creating either lock- If the client wishes to avoid accidentally creating either lock-
null or empty locked resources, an "If-Match: *" header can be null or empty locked resources, an "If-Match: *" header can be
included with LOCK requests to prevent the server from creating a included with LOCK requests to prevent the server from creating a
new resource. new resource.
If a LOCK request creates a resource and the client subsequently If a LOCK request creates a resource and the client subsequently
wants to overwrite that resource using a COPY or MOVE request, the wants to overwrite that resource using a COPY or MOVE request, the
client should include an "Overwrite: T" header. client should include an "Overwrite: T" header.
If a LOCK request creates a resource and the client then decides If a LOCK request creates a resource and the client then decides
to get rid of that resource, a DELETE request is supposed to fail to get rid of that resource, a DELETE request is supposed to fail
on a lock-null resource and UNLOCK should be used instead. But on a lock-null resource and UNLOCK should be used instead. But
with a locked empty resource, UNLOCK doesn't make the resource with a locked empty resource, UNLOCK doesn't make the resource
disappear. Therefore, the client might have to try both requests disappear. Therefore, the client might have to try both requests
and ignore an error in one of the two requests. and ignore an error in one of the two requests.
Appendix E. Guidance for Clients Desiring to Authenticate Appendix E. Guidance for Clients Desiring to Authenticate
Many WebDAV clients already implemented have account settings Many WebDAV clients that have already been implemented have account
(similar to the way email clients store IMAP account settings). settings (similar to the way email clients store IMAP account
Thus, the WebDAV client would be able to authenticate with its first settings). Thus, the WebDAV client would be able to authenticate
couple requests to the server, provided it had a way to get the with its first couple requests to the server, provided it had a way
authentication challenge from the server with realm name, nonce and to get the authentication challenge from the server with realm name,
other challenge information. Note that the results of some requests nonce, and other challenge information. Note that the results of
might vary according to whether the client is authenticated or not -- some requests might vary according to whether or not the client is
a PROPFIND might return more visible resources if the client is authenticated -- a PROPFIND might return more visible resources if
authenticated, yet not fail if the client is anonymous. the client is authenticated, yet not fail if the client is anonymous.
There are a number of ways the client might be able to trigger the There are a number of ways the client might be able to trigger the
server do provide an authentication challenge. This appendix server to provide an authentication challenge. This appendix
describes a couple approaches that seem particularly likely to work. describes a couple approaches that seem particularly likely to work.
The first approach is to perform a reques