--- 1/draft-ietf-webdav-rfc2518bis-14.txt 2006-05-15 22:12:57.000000000 +0200 +++ 2/draft-ietf-webdav-rfc2518bis-15.txt 2006-05-15 22:12:58.000000000 +0200 @@ -1,18 +1,18 @@ WebDAV L. Dusseault, Ed. Internet-Draft OSAF -Obsoletes: 2518 (if approved) February 17, 2006 -Expires: August 21, 2006 +Obsoletes: 2518 (if approved) April 2006 +Expires: October 3, 2006 HTTP Extensions for Distributed Authoring - WebDAV - draft-ietf-webdav-rfc2518bis-14 + draft-ietf-webdav-rfc2518bis-15 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 @@ -23,21 +23,21 @@ 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://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. - This Internet-Draft will expire on August 21, 2006. + This Internet-Draft will expire on October 3, 2006. Copyright Notice Copyright (C) The Internet Society (2006). Abstract WebDAV consists of a set of methods, headers, and content-types ancillary to HTTP/1.1 for the management of resource properties, creation and management of resource collections, URL namespace @@ -63,270 +63,272 @@ 5.2. Collection Resources . . . . . . . . . . . . . . . . . . 17 6. Locking . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 6.1. Lock Model . . . . . . . . . . . . . . . . . . . . . . . 20 6.2. Exclusive Vs. Shared Locks . . . . . . . . . . . . . . . 21 6.3. Required Support . . . . . . . . . . . . . . . . . . . . 22 6.4. Lock Creator and Privileges . . . . . . . . . . . . . . 22 6.5. Lock Tokens . . . . . . . . . . . . . . . . . . . . . . 23 6.6. Lock Timeout . . . . . . . . . . . . . . . . . . . . . . 24 6.7. Lock Capability Discovery . . . . . . . . . . . . . . . 24 6.8. Active Lock Discovery . . . . . . . . . . . . . . . . . 25 - 6.9. Locks and Multiple Bindings . . . . . . . . . . . . . . 25 7. Write Lock . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.1. Write Locks and Properties . . . . . . . . . . . . . . . 26 7.2. Avoiding Lost Updates . . . . . . . . . . . . . . . . . 27 7.3. Write Locks and Unmapped URLs . . . . . . . . . . . . . 28 - 7.4. Write Locks and Collections . . . . . . . . . . . . . . 30 - 7.5. Write Locks and the If Request Header . . . . . . . . . 31 - 7.5.1. Example - Write Lock and COPY . . . . . . . . . . . 32 - 7.5.2. Example - Deleting a member of a locked collection . 32 - 7.6. Write Locks and COPY/MOVE . . . . . . . . . . . . . . . 33 + 7.4. Write Locks and Collections . . . . . . . . . . . . . . 29 + 7.5. Write Locks and the If Request Header . . . . . . . . . 30 + 7.5.1. Example - Write Lock and COPY . . . . . . . . . . . 31 + 7.5.2. Example - Deleting a member of a locked collection . 31 + 7.6. Write Locks and COPY/MOVE . . . . . . . . . . . . . . . 32 7.7. Refreshing Write Locks . . . . . . . . . . . . . . . . . 33 - 8. General Request and Response Handling . . . . . . . . . . . . 35 - 8.1. Precedence in Error Handling . . . . . . . . . . . . . . 35 - 8.2. Use of XML . . . . . . . . . . . . . . . . . . . . . . . 35 - 8.3. URL Handling . . . . . . . . . . . . . . . . . . . . . . 36 - 8.3.1. Example - Correct URL Handling . . . . . . . . . . . 36 - 8.4. Required Bodies in Requests . . . . . . . . . . . . . . 37 - 8.5. HTTP Headers for use in WebDAV . . . . . . . . . . . . . 37 - 8.6. ETag . . . . . . . . . . . . . . . . . . . . . . . . . . 37 - 8.7. Including error response bodies . . . . . . . . . . . . 38 - 8.8. Impact of Namespace Operations on Cache Validators . . . 38 - 9. HTTP Methods for Distributed Authoring . . . . . . . . . . . 40 - 9.1. PROPFIND Method . . . . . . . . . . . . . . . . . . . . 40 - 9.1.1. PROPFIND status codes . . . . . . . . . . . . . . . 41 - 9.1.2. Status codes for use with 207 (Multi-Status) . . . . 42 - 9.1.3. Example - Retrieving Named Properties . . . . . . . 42 - 9.1.4. Example - Retrieving Named and Dead Properties . . . 44 + 8. General Request and Response Handling . . . . . . . . . . . . 34 + 8.1. Precedence in Error Handling . . . . . . . . . . . . . . 34 + 8.2. Use of XML . . . . . . . . . . . . . . . . . . . . . . . 34 + 8.3. URL Handling . . . . . . . . . . . . . . . . . . . . . . 35 + 8.3.1. Example - Correct URL Handling . . . . . . . . . . . 35 + 8.4. Required Bodies in Requests . . . . . . . . . . . . . . 36 + 8.5. HTTP Headers for use in WebDAV . . . . . . . . . . . . . 36 + 8.6. ETag . . . . . . . . . . . . . . . . . . . . . . . . . . 36 + 8.7. Including error response bodies . . . . . . . . . . . . 37 + 8.8. Impact of Namespace Operations on Cache Validators . . . 37 + 9. HTTP Methods for Distributed Authoring . . . . . . . . . . . 39 + 9.1. PROPFIND Method . . . . . . . . . . . . . . . . . . . . 39 + 9.1.1. PROPFIND status codes . . . . . . . . . . . . . . . 40 + 9.1.2. Status Codes for use in 'propstat' Element . . . . . 41 + 9.1.3. Example - Retrieving Named Properties . . . . . . . 41 + 9.1.4. Example - Using so-called 'allprop' . . . . . . . . 43 9.1.5. Example - Using 'propname' to Retrieve all - Property Names . . . . . . . . . . . . . . . . . . . 44 - 9.1.6. Example - Using 'allprop' . . . . . . . . . . . . . 46 - 9.2. PROPPATCH Method . . . . . . . . . . . . . . . . . . . . 48 - 9.2.1. Status Codes for use in 207 (Multi-Status) . . . . . 49 - 9.2.2. Example - PROPPATCH . . . . . . . . . . . . . . . . 50 - 9.3. MKCOL Method . . . . . . . . . . . . . . . . . . . . . . 51 - 9.3.1. MKCOL Status Codes . . . . . . . . . . . . . . . . . 52 - 9.3.2. Example - MKCOL . . . . . . . . . . . . . . . . . . 52 - 9.4. GET, HEAD for Collections . . . . . . . . . . . . . . . 53 - 9.5. POST for Collections . . . . . . . . . . . . . . . . . . 53 - 9.6. DELETE Requirements . . . . . . . . . . . . . . . . . . 53 - 9.6.1. DELETE for Collections . . . . . . . . . . . . . . . 54 - 9.6.2. Example - DELETE . . . . . . . . . . . . . . . . . . 54 - 9.7. PUT Requirements . . . . . . . . . . . . . . . . . . . . 55 - 9.7.1. PUT for Non-Collection Resources . . . . . . . . . . 55 - 9.7.2. PUT for Collections . . . . . . . . . . . . . . . . 56 - 9.8. COPY Method . . . . . . . . . . . . . . . . . . . . . . 56 - 9.8.1. COPY for Non-collection Resources . . . . . . . . . 56 - 9.8.2. COPY for Properties . . . . . . . . . . . . . . . . 57 - 9.8.3. COPY for Collections . . . . . . . . . . . . . . . . 57 - 9.8.4. COPY and Overwriting Destination Resources . . . . . 58 - 9.8.5. Status Codes . . . . . . . . . . . . . . . . . . . . 59 - 9.8.6. Example - COPY with Overwrite . . . . . . . . . . . 60 - 9.8.7. Example - COPY with No Overwrite . . . . . . . . . . 60 - 9.8.8. Example - COPY of a Collection . . . . . . . . . . . 61 - 9.9. MOVE Method . . . . . . . . . . . . . . . . . . . . . . 61 - 9.9.1. MOVE for Properties . . . . . . . . . . . . . . . . 62 - 9.9.2. MOVE for Collections . . . . . . . . . . . . . . . . 62 - 9.9.3. MOVE and the Overwrite Header . . . . . . . . . . . 63 - 9.9.4. Status Codes . . . . . . . . . . . . . . . . . . . . 63 - 9.9.5. Example - MOVE of a Non-Collection . . . . . . . . . 64 - 9.9.6. Example - MOVE of a Collection . . . . . . . . . . . 65 + Property Names . . . . . . . . . . . . . . . . . . . 43 + 9.1.6. Example - Using 'allprop' . . . . . . . . . . . . . 45 + 9.2. PROPPATCH Method . . . . . . . . . . . . . . . . . . . . 47 + 9.2.1. Status Codes for use in 'propstat' Element . . . . . 48 + 9.2.2. Example - PROPPATCH . . . . . . . . . . . . . . . . 49 + 9.3. MKCOL Method . . . . . . . . . . . . . . . . . . . . . . 50 + 9.3.1. MKCOL Status Codes . . . . . . . . . . . . . . . . . 51 + 9.3.2. Example - MKCOL . . . . . . . . . . . . . . . . . . 51 + 9.4. GET, HEAD for Collections . . . . . . . . . . . . . . . 52 + 9.5. POST for Collections . . . . . . . . . . . . . . . . . . 52 + 9.6. DELETE Requirements . . . . . . . . . . . . . . . . . . 52 + 9.6.1. DELETE for Collections . . . . . . . . . . . . . . . 53 + 9.6.2. Example - DELETE . . . . . . . . . . . . . . . . . . 53 + 9.7. PUT Requirements . . . . . . . . . . . . . . . . . . . . 54 + 9.7.1. PUT for Non-Collection Resources . . . . . . . . . . 54 + 9.7.2. PUT for Collections . . . . . . . . . . . . . . . . 55 + 9.8. COPY Method . . . . . . . . . . . . . . . . . . . . . . 55 + 9.8.1. COPY for Non-collection Resources . . . . . . . . . 55 + 9.8.2. COPY for Properties . . . . . . . . . . . . . . . . 56 + 9.8.3. COPY for Collections . . . . . . . . . . . . . . . . 56 + 9.8.4. COPY and Overwriting Destination Resources . . . . . 57 + 9.8.5. Status Codes . . . . . . . . . . . . . . . . . . . . 58 + 9.8.6. Example - COPY with Overwrite . . . . . . . . . . . 59 + 9.8.7. Example - COPY with No Overwrite . . . . . . . . . . 59 + 9.8.8. Example - COPY of a Collection . . . . . . . . . . . 60 + 9.9. MOVE Method . . . . . . . . . . . . . . . . . . . . . . 60 + 9.9.1. MOVE for Properties . . . . . . . . . . . . . . . . 61 + 9.9.2. MOVE for Collections . . . . . . . . . . . . . . . . 61 + 9.9.3. MOVE and the Overwrite Header . . . . . . . . . . . 62 + 9.9.4. Status Codes . . . . . . . . . . . . . . . . . . . . 62 + 9.9.5. Example - MOVE of a Non-Collection . . . . . . . . . 63 + 9.9.6. Example - MOVE of a Collection . . . . . . . . . . . 64 9.10. LOCK Method . . . . . . . . . . . . . . . . . . . . . . 65 - 9.10.1. Creating a lock on existing resource . . . . . . . . 66 - 9.10.2. Refreshing Locks . . . . . . . . . . . . . . . . . . 66 - 9.10.3. Depth and Locking . . . . . . . . . . . . . . . . . 67 - 9.10.4. Locking Unmapped URLs . . . . . . . . . . . . . . . 67 - 9.10.5. Lock Compatibility Table . . . . . . . . . . . . . . 68 - 9.10.6. LOCK Responses . . . . . . . . . . . . . . . . . . . 68 - 9.10.7. Example - Simple Lock Request . . . . . . . . . . . 69 - 9.10.8. Example - Refreshing a Write Lock . . . . . . . . . 71 - 9.10.9. Example - Multi-Resource Lock Request . . . . . . . 72 - 9.11. UNLOCK Method . . . . . . . . . . . . . . . . . . . . . 73 - 9.11.1. Status Codes . . . . . . . . . . . . . . . . . . . . 73 - 9.11.2. Example - UNLOCK . . . . . . . . . . . . . . . . . . 74 - 10. HTTP Headers for Distributed Authoring . . . . . . . . . . . 75 - 10.1. DAV Header . . . . . . . . . . . . . . . . . . . . . . . 75 - 10.2. Depth Header . . . . . . . . . . . . . . . . . . . . . . 76 - 10.3. Destination Header . . . . . . . . . . . . . . . . . . . 77 - 10.4. If Header . . . . . . . . . . . . . . . . . . . . . . . 77 - 10.4.1. Purpose . . . . . . . . . . . . . . . . . . . . . . 77 - 10.4.2. Syntax . . . . . . . . . . . . . . . . . . . . . . . 78 - 10.4.3. List Evaluation . . . . . . . . . . . . . . . . . . 79 - 10.4.4. Matching State Tokens and ETags . . . . . . . . . . 79 - 10.4.5. If Header and Non-DAV Aware Proxies . . . . . . . . 80 - 10.4.6. Example - No-tag Production . . . . . . . . . . . . 80 - 10.4.7. Example - using "Not" with No-tag Production . . . . 80 + 9.10.1. Creating a lock on existing resource . . . . . . . . 65 + 9.10.2. Refreshing Locks . . . . . . . . . . . . . . . . . . 65 + 9.10.3. Depth and Locking . . . . . . . . . . . . . . . . . 66 + 9.10.4. Locking Unmapped URLs . . . . . . . . . . . . . . . 66 + 9.10.5. Lock Compatibility Table . . . . . . . . . . . . . . 67 + 9.10.6. LOCK Responses . . . . . . . . . . . . . . . . . . . 67 + 9.10.7. Example - Simple Lock Request . . . . . . . . . . . 68 + 9.10.8. Example - Refreshing a Write Lock . . . . . . . . . 70 + 9.10.9. Example - Multi-Resource Lock Request . . . . . . . 71 + 9.11. UNLOCK Method . . . . . . . . . . . . . . . . . . . . . 72 + 9.11.1. Status Codes . . . . . . . . . . . . . . . . . . . . 72 + 9.11.2. Example - UNLOCK . . . . . . . . . . . . . . . . . . 73 + 10. HTTP Headers for Distributed Authoring . . . . . . . . . . . 74 + 10.1. DAV Header . . . . . . . . . . . . . . . . . . . . . . . 74 + 10.2. Depth Header . . . . . . . . . . . . . . . . . . . . . . 75 + 10.3. Destination Header . . . . . . . . . . . . . . . . . . . 76 + 10.4. If Header . . . . . . . . . . . . . . . . . . . . . . . 76 + 10.4.1. Purpose . . . . . . . . . . . . . . . . . . . . . . 76 + 10.4.2. Syntax . . . . . . . . . . . . . . . . . . . . . . . 77 + 10.4.3. List Evaluation . . . . . . . . . . . . . . . . . . 78 + 10.4.4. Matching State Tokens and ETags . . . . . . . . . . 78 + 10.4.5. If Header and Non-DAV Aware Proxies . . . . . . . . 79 + 10.4.6. Example - No-tag Production . . . . . . . . . . . . 79 + 10.4.7. Example - using "Not" with No-tag Production . . . . 79 10.4.8. Example - causing a Condition to always evaluate - to True . . . . . . . . . . . . . . . . . . . . . . 81 - 10.4.9. Example - Tagged List If header in COPY . . . . . . 81 + to True . . . . . . . . . . . . . . . . . . . . . . 80 + 10.4.9. Example - Tagged List If header in COPY . . . . . . 80 10.4.10. Example - Matching lock tokens with collection - locks . . . . . . . . . . . . . . . . . . . . . . . 81 - 10.4.11. Example - Matching ETags on unmapped URLs . . . . . 82 - 10.5. Lock-Token Header . . . . . . . . . . . . . . . . . . . 82 - 10.6. Overwrite Header . . . . . . . . . . . . . . . . . . . . 82 - 10.7. Timeout Request Header . . . . . . . . . . . . . . . . . 83 - 11. Status Code Extensions to HTTP/1.1 . . . . . . . . . . . . . 84 - 11.1. 207 Multi-Status . . . . . . . . . . . . . . . . . . . . 84 - 11.2. 422 Unprocessable Entity . . . . . . . . . . . . . . . . 84 - 11.3. 423 Locked . . . . . . . . . . . . . . . . . . . . . . . 84 - 11.4. 424 Failed Dependency . . . . . . . . . . . . . . . . . 84 - 11.5. 507 Insufficient Storage . . . . . . . . . . . . . . . . 84 - 12. Use of HTTP Status Codes . . . . . . . . . . . . . . . . . . 85 - 12.1. 412 Precondition Failed . . . . . . . . . . . . . . . . 85 - 12.2. 414 Request-URI Too Long . . . . . . . . . . . . . . . . 85 - 13. Multi-Status Response . . . . . . . . . . . . . . . . . . . . 86 - 13.1. Response headers . . . . . . . . . . . . . . . . . . . . 86 + locks . . . . . . . . . . . . . . . . . . . . . . . 80 + 10.4.11. Example - Matching ETags on unmapped URLs . . . . . 81 + 10.5. Lock-Token Header . . . . . . . . . . . . . . . . . . . 81 + 10.6. Overwrite Header . . . . . . . . . . . . . . . . . . . . 81 + 10.7. Timeout Request Header . . . . . . . . . . . . . . . . . 82 + 11. Status Code Extensions to HTTP/1.1 . . . . . . . . . . . . . 83 + 11.1. 207 Multi-Status . . . . . . . . . . . . . . . . . . . . 83 + 11.2. 422 Unprocessable Entity . . . . . . . . . . . . . . . . 83 + 11.3. 423 Locked . . . . . . . . . . . . . . . . . . . . . . . 83 + 11.4. 424 Failed Dependency . . . . . . . . . . . . . . . . . 83 + 11.5. 507 Insufficient Storage . . . . . . . . . . . . . . . . 83 + 12. Use of HTTP Status Codes . . . . . . . . . . . . . . . . . . 84 + 12.1. 412 Precondition Failed . . . . . . . . . . . . . . . . 84 + 12.2. 414 Request-URI Too Long . . . . . . . . . . . . . . . . 84 + 13. Multi-Status Response . . . . . . . . . . . . . . . . . . . . 85 + 13.1. Response headers . . . . . . . . . . . . . . . . . . . . 85 13.2. Handling redirected child resources . . . . . . . . . . 86 - 13.3. Internal Status Codes . . . . . . . . . . . . . . . . . 87 - 14. XML Element Definitions . . . . . . . . . . . . . . . . . . . 88 - 14.1. activelock XML Element . . . . . . . . . . . . . . . . . 88 - 14.2. allprop XML Element . . . . . . . . . . . . . . . . . . 88 - 14.3. collection XML Element . . . . . . . . . . . . . . . . . 88 - 14.4. depth XML Element . . . . . . . . . . . . . . . . . . . 89 - 14.5. error XML Element . . . . . . . . . . . . . . . . . . . 89 - 14.6. exclusive XML Element . . . . . . . . . . . . . . . . . 89 - 14.7. href XML Element . . . . . . . . . . . . . . . . . . . . 89 - 14.8. include XML Element . . . . . . . . . . . . . . . . . . 90 - 14.9. location XML Element . . . . . . . . . . . . . . . . . . 90 - 14.10. lockentry XML Element . . . . . . . . . . . . . . . . . 90 - 14.11. lockinfo XML Element . . . . . . . . . . . . . . . . . . 90 - 14.12. lockroot XML Element . . . . . . . . . . . . . . . . . . 91 - 14.13. lockscope XML Element . . . . . . . . . . . . . . . . . 91 - 14.14. locktoken XML Element . . . . . . . . . . . . . . . . . 91 - 14.15. locktype XML Element . . . . . . . . . . . . . . . . . . 91 - 14.16. multistatus XML Element . . . . . . . . . . . . . . . . 92 - 14.17. owner XML Element . . . . . . . . . . . . . . . . . . . 92 - 14.18. prop XML element . . . . . . . . . . . . . . . . . . . . 93 - 14.19. propertyupdate XML element . . . . . . . . . . . . . . . 93 - 14.20. propfind XML Element . . . . . . . . . . . . . . . . . . 93 - 14.21. propname XML Element . . . . . . . . . . . . . . . . . . 93 - 14.22. propstat XML Element . . . . . . . . . . . . . . . . . . 94 - 14.23. remove XML element . . . . . . . . . . . . . . . . . . . 94 - 14.24. response XML Element . . . . . . . . . . . . . . . . . . 94 - 14.25. responsedescription XML Element . . . . . . . . . . . . 95 - 14.26. set XML element . . . . . . . . . . . . . . . . . . . . 95 - 14.27. shared XML Element . . . . . . . . . . . . . . . . . . . 95 - 14.28. status XML Element . . . . . . . . . . . . . . . . . . . 96 - 14.29. timeout XML Element . . . . . . . . . . . . . . . . . . 96 - 14.30. write XML Element . . . . . . . . . . . . . . . . . . . 96 - 15. DAV Properties . . . . . . . . . . . . . . . . . . . . . . . 97 - 15.1. creationdate Property . . . . . . . . . . . . . . . . . 97 - 15.2. displayname Property . . . . . . . . . . . . . . . . . . 98 - 15.3. getcontentlanguage Property . . . . . . . . . . . . . . 98 - 15.4. getcontentlength Property . . . . . . . . . . . . . . . 99 - 15.5. getcontenttype Property . . . . . . . . . . . . . . . . 99 - 15.6. getetag Property . . . . . . . . . . . . . . . . . . . . 100 - 15.7. getlastmodified Property . . . . . . . . . . . . . . . . 100 - 15.8. lockdiscovery Property . . . . . . . . . . . . . . . . . 101 - 15.8.1. Example - Retrieving DAV:lockdiscovery . . . . . . . 102 - 15.9. resourcetype Property . . . . . . . . . . . . . . . . . 103 - 15.10. supportedlock Property . . . . . . . . . . . . . . . . . 104 - 15.10.1. Example - Retrieving DAV:supportedlock . . . . . . . 105 - 16. Precondition/postcondition XML elements . . . . . . . . . . . 106 - 17. XML Extensibility in DAV . . . . . . . . . . . . . . . . . . 110 - 18. DAV Compliance Classes . . . . . . . . . . . . . . . . . . . 112 - 18.1. Class 1 . . . . . . . . . . . . . . . . . . . . . . . . 112 - 18.2. Class 2 . . . . . . . . . . . . . . . . . . . . . . . . 112 - 18.3. Class 3 . . . . . . . . . . . . . . . . . . . . . . . . 112 - 19. Internationalization Considerations . . . . . . . . . . . . . 114 - 20. Security Considerations . . . . . . . . . . . . . . . . . . . 116 - 20.1. Authentication of Clients . . . . . . . . . . . . . . . 116 - 20.2. Denial of Service . . . . . . . . . . . . . . . . . . . 116 - 20.3. Security through Obscurity . . . . . . . . . . . . . . . 117 - 20.4. Privacy Issues Connected to Locks . . . . . . . . . . . 117 - 20.5. Privacy Issues Connected to Properties . . . . . . . . . 117 - 20.6. Implications of XML Entities . . . . . . . . . . . . . . 118 - 20.7. Risks Connected with Lock Tokens . . . . . . . . . . . . 119 - 20.8. Hosting Malicious Content . . . . . . . . . . . . . . . 119 - 21. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 120 - 21.1. New URI Schemes . . . . . . . . . . . . . . . . . . . . 120 - 21.2. XML Namespaces . . . . . . . . . . . . . . . . . . . . . 120 - 21.3. Message Header Fields . . . . . . . . . . . . . . . . . 120 - 21.3.1. DAV . . . . . . . . . . . . . . . . . . . . . . . . 120 - 21.3.2. Depth . . . . . . . . . . . . . . . . . . . . . . . 120 - 21.3.3. Destination . . . . . . . . . . . . . . . . . . . . 121 - 21.3.4. If . . . . . . . . . . . . . . . . . . . . . . . . . 121 - 21.3.5. Lock-Token . . . . . . . . . . . . . . . . . . . . . 121 - 21.3.6. Overwrite . . . . . . . . . . . . . . . . . . . . . 121 - 21.3.7. Timeout . . . . . . . . . . . . . . . . . . . . . . 122 - 22. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 123 - 23. Contributors to This Specification . . . . . . . . . . . . . 125 - 24. Authors of RFC2518 . . . . . . . . . . . . . . . . . . . . . 126 - 25. References . . . . . . . . . . . . . . . . . . . . . . . . . 127 - 25.1. Normative References . . . . . . . . . . . . . . . . . . 127 - 25.2. Informational References . . . . . . . . . . . . . . . . 128 - Appendix A. Notes on Processing XML Elements . . . . . . . . . . 129 - A.1. Notes on Empty XML Elements . . . . . . . . . . . . . . 129 - A.2. Notes on Illegal XML Processing . . . . . . . . . . . . 129 - A.3. Example - XML Syntax Error . . . . . . . . . . . . . . . 129 - A.4. Example - Unexpected XML Element . . . . . . . . . . . . 130 - Appendix B. Notes on HTTP Client Compatibility . . . . . . . . . 131 - Appendix C. The opaquelocktoken scheme and URIs . . . . . . . . 132 - Appendix D. Guidance for Clients Desiring to Authenticate . . . 133 - Appendix E. Summary of changes from RFC2518 . . . . . . . . . . 135 - E.1. Changes for both Client and Server Implementations . . . 135 - E.2. Changes for Server Implementations . . . . . . . . . . . 136 - E.3. Other Changes . . . . . . . . . . . . . . . . . . . . . 137 - Appendix F. Change Log (to be removed by RFC Editor before + 13.3. Internal Status Codes . . . . . . . . . . . . . . . . . 86 + 14. XML Element Definitions . . . . . . . . . . . . . . . . . . . 87 + 14.1. activelock XML Element . . . . . . . . . . . . . . . . . 87 + 14.2. allprop XML Element . . . . . . . . . . . . . . . . . . 87 + 14.3. collection XML Element . . . . . . . . . . . . . . . . . 87 + 14.4. depth XML Element . . . . . . . . . . . . . . . . . . . 87 + 14.5. error XML Element . . . . . . . . . . . . . . . . . . . 88 + 14.6. exclusive XML Element . . . . . . . . . . . . . . . . . 88 + 14.7. href XML Element . . . . . . . . . . . . . . . . . . . . 88 + 14.8. include XML Element . . . . . . . . . . . . . . . . . . 89 + 14.9. location XML Element . . . . . . . . . . . . . . . . . . 89 + 14.10. lockentry XML Element . . . . . . . . . . . . . . . . . 89 + 14.11. lockinfo XML Element . . . . . . . . . . . . . . . . . . 89 + 14.12. lockroot XML Element . . . . . . . . . . . . . . . . . . 90 + 14.13. lockscope XML Element . . . . . . . . . . . . . . . . . 90 + 14.14. locktoken XML Element . . . . . . . . . . . . . . . . . 90 + 14.15. locktype XML Element . . . . . . . . . . . . . . . . . . 90 + 14.16. multistatus XML Element . . . . . . . . . . . . . . . . 91 + 14.17. owner XML Element . . . . . . . . . . . . . . . . . . . 91 + 14.18. prop XML element . . . . . . . . . . . . . . . . . . . . 91 + 14.19. propertyupdate XML element . . . . . . . . . . . . . . . 92 + 14.20. propfind XML Element . . . . . . . . . . . . . . . . . . 92 + 14.21. propname XML Element . . . . . . . . . . . . . . . . . . 92 + 14.22. propstat XML Element . . . . . . . . . . . . . . . . . . 92 + 14.23. remove XML element . . . . . . . . . . . . . . . . . . . 93 + 14.24. response XML Element . . . . . . . . . . . . . . . . . . 93 + 14.25. responsedescription XML Element . . . . . . . . . . . . 94 + 14.26. set XML element . . . . . . . . . . . . . . . . . . . . 94 + 14.27. shared XML Element . . . . . . . . . . . . . . . . . . . 94 + 14.28. status XML Element . . . . . . . . . . . . . . . . . . . 94 + 14.29. timeout XML Element . . . . . . . . . . . . . . . . . . 95 + 14.30. write XML Element . . . . . . . . . . . . . . . . . . . 95 + 15. DAV Properties . . . . . . . . . . . . . . . . . . . . . . . 96 + 15.1. creationdate Property . . . . . . . . . . . . . . . . . 96 + 15.2. displayname Property . . . . . . . . . . . . . . . . . . 97 + 15.3. getcontentlanguage Property . . . . . . . . . . . . . . 97 + 15.4. getcontentlength Property . . . . . . . . . . . . . . . 98 + 15.5. getcontenttype Property . . . . . . . . . . . . . . . . 98 + 15.6. getetag Property . . . . . . . . . . . . . . . . . . . . 99 + 15.7. getlastmodified Property . . . . . . . . . . . . . . . . 99 + 15.8. lockdiscovery Property . . . . . . . . . . . . . . . . . 100 + 15.8.1. Example - Retrieving DAV:lockdiscovery . . . . . . . 101 + 15.9. resourcetype Property . . . . . . . . . . . . . . . . . 102 + 15.10. supportedlock Property . . . . . . . . . . . . . . . . . 103 + 15.10.1. Example - Retrieving DAV:supportedlock . . . . . . . 104 + 16. Precondition/postcondition XML elements . . . . . . . . . . . 105 + 17. XML Extensibility in DAV . . . . . . . . . . . . . . . . . . 109 + 18. DAV Compliance Classes . . . . . . . . . . . . . . . . . . . 111 + 18.1. Class 1 . . . . . . . . . . . . . . . . . . . . . . . . 111 + 18.2. Class 2 . . . . . . . . . . . . . . . . . . . . . . . . 111 + 18.3. Class 3 . . . . . . . . . . . . . . . . . . . . . . . . 111 + 19. Internationalization Considerations . . . . . . . . . . . . . 113 + 20. Security Considerations . . . . . . . . . . . . . . . . . . . 115 + 20.1. Authentication of Clients . . . . . . . . . . . . . . . 115 + 20.2. Denial of Service . . . . . . . . . . . . . . . . . . . 115 + 20.3. Security through Obscurity . . . . . . . . . . . . . . . 116 + 20.4. Privacy Issues Connected to Locks . . . . . . . . . . . 116 + 20.5. Privacy Issues Connected to Properties . . . . . . . . . 116 + 20.6. Implications of XML Entities . . . . . . . . . . . . . . 117 + 20.7. Risks Connected with Lock Tokens . . . . . . . . . . . . 118 + 20.8. Hosting Malicious Content . . . . . . . . . . . . . . . 118 + 21. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 119 + 21.1. New URI Schemes . . . . . . . . . . . . . . . . . . . . 119 + 21.2. XML Namespaces . . . . . . . . . . . . . . . . . . . . . 119 + 21.3. Message Header Fields . . . . . . . . . . . . . . . . . 119 + 21.3.1. DAV . . . . . . . . . . . . . . . . . . . . . . . . 119 + 21.3.2. Depth . . . . . . . . . . . . . . . . . . . . . . . 119 + 21.3.3. Destination . . . . . . . . . . . . . . . . . . . . 120 + 21.3.4. If . . . . . . . . . . . . . . . . . . . . . . . . . 120 + 21.3.5. Lock-Token . . . . . . . . . . . . . . . . . . . . . 120 + 21.3.6. Overwrite . . . . . . . . . . . . . . . . . . . . . 120 + 21.3.7. Timeout . . . . . . . . . . . . . . . . . . . . . . 121 + 22. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 122 + 23. Contributors to This Specification . . . . . . . . . . . . . 124 + 24. Authors of RFC2518 . . . . . . . . . . . . . . . . . . . . . 125 + 25. References . . . . . . . . . . . . . . . . . . . . . . . . . 126 + 25.1. Normative References . . . . . . . . . . . . . . . . . . 126 + 25.2. Informational References . . . . . . . . . . . . . . . . 127 + Appendix A. Notes on Processing XML Elements . . . . . . . . . . 128 + A.1. Notes on Empty XML Elements . . . . . . . . . . . . . . 128 + A.2. Notes on Illegal XML Processing . . . . . . . . . . . . 128 + A.3. Example - XML Syntax Error . . . . . . . . . . . . . . . 128 + A.4. Example - Unexpected XML Element . . . . . . . . . . . . 129 + Appendix B. Notes on HTTP Client Compatibility . . . . . . . . . 130 + Appendix C. The opaquelocktoken scheme and URIs . . . . . . . . 131 + Appendix D. Lock-null Resources . . . . . . . . . . . . . . . . 132 + Appendix E. Guidance for Clients Desiring to Authenticate . . . 133 + Appendix F. Summary of changes from RFC2518 . . . . . . . . . . 135 + F.1. Changes for both Client and Server Implementations . . . 135 + F.2. Changes for Server Implementations . . . . . . . . . . . 136 + F.3. Other Changes . . . . . . . . . . . . . . . . . . . . . 137 + Appendix G. Change Log (to be removed by RFC Editor before publication) . . . . . . . . . . . . . . . . . . . . 138 - F.1. Changes from -05 to -06 . . . . . . . . . . . . . . . . 138 - F.2. Changes in -07 . . . . . . . . . . . . . . . . . . . . . 138 - F.3. Changes in -08 . . . . . . . . . . . . . . . . . . . . . 139 - F.4. Changes in -09 . . . . . . . . . . . . . . . . . . . . . 140 - F.5. Changes in -10 . . . . . . . . . . . . . . . . . . . . . 141 - F.6. Changes in -11 . . . . . . . . . . . . . . . . . . . . . 141 - F.7. Changes in -12 . . . . . . . . . . . . . . . . . . . . . 141 - F.8. Changes in -13 . . . . . . . . . . . . . . . . . . . . . 142 - F.9. Changes in -14 . . . . . . . . . . . . . . . . . . . . . 142 + G.1. Changes from -05 to -06 . . . . . . . . . . . . . . . . 138 + G.2. Changes in -07 . . . . . . . . . . . . . . . . . . . . . 138 + G.3. Changes in -08 . . . . . . . . . . . . . . . . . . . . . 139 + G.4. Changes in -09 . . . . . . . . . . . . . . . . . . . . . 140 + G.5. Changes in -10 . . . . . . . . . . . . . . . . . . . . . 141 + G.6. Changes in -11 . . . . . . . . . . . . . . . . . . . . . 141 + G.7. Changes in -12 . . . . . . . . . . . . . . . . . . . . . 141 + G.8. Changes in -13 . . . . . . . . . . . . . . . . . . . . . 142 + G.9. Changes in -14 . . . . . . . . . . . . . . . . . . . . . 142 + G.10. Changes in -15 . . . . . . . . . . . . . . . . . . . . . 142 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 143 Intellectual Property and Copyright Statements . . . . . . . . . 144 1. Introduction This document describes an extension to the HTTP/1.1 protocol that allows clients to perform remote web content authoring operations. This extension provides a coherent set of methods, headers, request entity body formats, and response entity body formats that provide operations for: Properties: The ability to create, remove, and query information - about Web pages, such as their authors, creation dates, etc. Also, - the ability to link pages of any media type to related pages. + about Web pages, such as their authors, creation dates, etc. Collections: The ability to create sets of documents and to retrieve a hierarchical membership listing (like a directory listing in a file system). Locking: The ability to keep more than one person from working on a document at the same time. This prevents the "lost update problem", in which modifications are lost as first one author then another writes changes without merging the other author's changes. Namespace Operations: The ability to instruct the server to copy and - move Web resources, operations which change the URL. + move Web resources, operations which change the mapping from URLs to + resources. Requirements and rationale for these operations are described in a companion document, "Requirements for a Distributed Authoring and Versioning Protocol for the World Wide Web" [RFC2291]. - This standard does not specify the versioning operations suggested by + This document does not specify the versioning operations suggested by [RFC2291]. That work was done in a separate document, "Versioning Extensions to WebDAV" [RFC3253]. The sections below provide a detailed introduction to various WebDAV abstractions: resource properties (Section 4), collections of resources (Section 5), locks (Section 6) in general and write locks (Section 7) specifically. These abstractions are manipulated by the WebDAV-specific HTTP methods (Section 9) and the new HTTP headers (Section 10) used with - WebDAV methods. + WebDAV methods. General considerations for handling HTTP requests + and responses in WebDAV are found in Section 8. While the status codes provided by HTTP/1.1 are sufficient to describe most error conditions encountered by WebDAV methods, there are some errors that do not fall neatly into the existing categories. This specification defines new status codes developed for WebDAV methods (Section 11) and describes existing HTTP status codes (Section 12) as used in WebDAV. Since some WebDAV methods may operate over many resources, the Multi-Status response (Section 13) has been introduced to return status information for multiple resources. Finally, this version of WebDAV introduces precondition @@ -341,23 +343,23 @@ Finishing off the specification are sections on what it means for a resource to be compliant with this specification (Section 18), on internationalization support (Section 19), and on security (Section 20). 2. Notational Conventions Since this document describes a set of extensions to the HTTP/1.1 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 - 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. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. Note that in natural language, a property like the "creationdate" property in the "DAV:" XML namespace is sometimes referred to as "DAV:creationdate" for brevity. @@ -373,25 +375,25 @@ to have zero, one, or many URI mappings. Mapping a resource to an "http" scheme URI makes it possible to submit HTTP protocol requests to the resource using the URI. Path Segment - Informally, the characters found between slashes ("/") in a URI. Formally, as defined in Section 3.3 of [RFC3986]. Collection - Informally, a resource that also acts as a container of references to child resources. Formally, a resource that contains a set of mappings between path segments and resources and meets the - requirements in Section 5. + requirements defined in Section 5. Internal Member (of a Collection) - Informally, a child resource of a collection. Formally, a resource referenced by a path segment - contained in the collection. + mapping contained in the collection. Internal Member URL (of a Collection) - A URL of an internal member, consisting of the URL of the collection (including trailing slash) plus the path segment identifying the internal member. Member (of a Collection) - Informally, a "descendant" of a collection. Formally, an internal member of the collection, or, recursively, a member of an internal member. Member URL (of a Collection) - A URL that is either an internal @@ -429,27 +431,27 @@ 'subject' property might allow for the indexing of all resources by their subject, and an 'author' property might allow for the discovery of what authors have written which documents. The DAV property model consists of name/value pairs. The name of a property identifies the property's syntax and semantics, and provides an address by which to refer to its syntax and semantics. There are two categories of properties: "live" and "dead". A live property has its syntax and semantics enforced by the server. Live - properties include cases where a) the value of a property is read- - only, maintained by the server, and b) the value of the property is - maintained by the client, but the server performs syntax checking on - submitted values. All instances of a given live property MUST comply - with the definition associated with that property name. A dead - property has its syntax and semantics enforced by the client; the - server merely records the value of the property verbatim. + properties include cases where a) the value of a property is + protected, maintained by the server, and b) the value of the property + is maintained by the client, but the server performs syntax checking + on submitted values. All instances of a given live property MUST + comply with the definition associated with that property name. A + dead property has its syntax and semantics enforced by the client; + the server merely records the value of the property verbatim. 4.2. Properties and HTTP Headers Properties already exist, in a limited sense, in HTTP message headers. However, in distributed authoring environments a relatively large number of properties are needed to describe the state of a resource, and setting/returning them all through HTTP headers is inefficient. Thus a mechanism is needed which allows a principal to identify a set of properties in which the principal is interested and to set or retrieve just those properties. @@ -465,21 +467,21 @@ adding new elements. Older clients will not break when they encounter extensions because they will still have the data specified in the original schema and MUST ignore elements they do not understand. XML's support for multiple character sets allows any human-readable property to be encoded and read in a character set familiar to the user. XML's support for multiple human languages, using the "xml: lang" attribute, handles cases where the same character set is employed by multiple human languages. Note that xml:lang scope is - recursive, so a xml:lang attribute on any element containing a + recursive, so an xml:lang attribute on any element containing a property name element applies to the property value unless it has been overridden by a more locally scoped attribute. Note that a property only has one value, in one language (or language MAY be left undefined), not multiple values in different languages or a single value in multiple languages. A property is always represented with an XML element consisting of the property name, called the "property name element". The simplest example is an empty property, which is different from a property that does not exist: @@ -658,67 +660,82 @@ All DAV compliant resources MUST support the HTTP URL namespace model specified herein. 5.1. HTTP URL Namespace Model The HTTP URL namespace is a hierarchical namespace where the hierarchy is delimited with the "/" character. An HTTP URL namespace is said to be consistent if it meets the following conditions: for every URL in the HTTP hierarchy there - exists a collection that contains that URL as an internal member. + exists a collection that contains that URL as an internal member URL. The root, or top-level collection of the namespace under - 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 the collection identified by the absolute path '/', it may be identified by one or more path segments (e.g. /servlets/webdav/...) Neither HTTP/1.1 nor WebDAV require that the entire HTTP URL namespace be consistent -- a WebDAV-compatible resource may not have a parent collection. However, certain WebDAV methods are prohibited from producing results that cause namespace inconsistencies. - Although implicit in [RFC2616] and [RFC3986], any resource, including + As is implicit in [RFC2616] and [RFC3986], any resource, including collection resources, MAY be identified by more than one URI. For example, a resource could be identified by multiple HTTP URLs. 5.2. Collection Resources Collection resources differ from other resources in that they also act as containers. A collection is a resource whose state consists of at least a set of mappings between path segments and resources, - and a set of properties on the collection itself. A collection MAY - have additional state such as entity bodies returned by GET. + and a set of properties on the 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 mapping which maps to B and which is + contained in A. A collection MUST contain at most one mapping for a + given path segment, i.e., it is illegal to have the same path segment + mapped to more than one resource. - A collection MUST contain at most one mapping for a given path - segment, i.e., it is illegal to have the same path segment mapped to - more than one resource. Properties defined on collections behave - exactly as do properties on non-collection resources. + Properties defined on collections behave exactly as do properties on + non-collection resources. A collection MAY have additional state + such as entity bodies returned by GET. 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 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 and if resource A with URL "http://example.com/bar/" is WebDAV - compliant, then resource A must be a collection and must contain at - least one mapping from "blah" to B. + compliant, then resource A must be a collection and must contain + exactly one mapping from "blah" to B. + + Although commonly a mapping consists of a single segment and a + resource, in general, a mapping consists of a set of segments and a + resource. This allows a server to treat a set of segments as + equivalent (i.e. either all of the segments are mapped to the same + resource, or none of the segments are mapped to a resource). For + example, a server that performs case-folding on segments will treat + the segments "ab", "Ab", "aB", and "AB" as equivalent. A client can + then use any of these segments to identify the resource. Note that a + PROPFIND result will select one of these equivalent segments to + identify the mapping, so there will be one PROPFIND response element + per mapping, not one per segment in the mapping. Collection resources MAY have mappings to non-WebDAV compliant resources in the HTTP URL namespace hierarchy but are not required to do so. For example, if resource X with URL "http://example.com/bar/blah" is not WebDAV compliant and resource A with "URL http://example.com/bar/" identifies a WebDAV collection, then A may or may not have a mapping from "blah" to X. - If a WebDAV compliant resource has no WebDAV compliant children in - the HTTP URL namespace hierarchy then the WebDAV compliant resource - is not required to be a collection. + If a WebDAV compliant resource has no WebDAV compliant internal + members in the HTTP URL namespace hierarchy then the WebDAV compliant + resource is not required to be a collection. There is a standing convention that when a collection is referred to by its name without a trailing slash, the server MAY handle the request as if the trailing slash were present. In this case it SHOULD return a Content-Location header in the response, pointing to the URL ending with the "/". For example, if a client invokes a method on http://example.com/blah (no trailing slash), the server may respond as if the operation were invoked on http://example.com/blah/ (trailing slash), and should return a Content-Location header with the value http://example.com/blah/. Wherever a server produces a URL @@ -744,21 +761,24 @@ "/col/link" would indeed be mapped. Similarly, a dynamically- 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 appear as a member of "/col/". Some mappings to even WebDAV-compliant resources might not appear in the parent collection. An example for this case are servers that support multiple alias URLs for each WebDAV compliant resource. A server may implement case-insensitive URLs, thus "/col/a" and "/col/A" identify the same resource, yet only either "a" or "A" are - reported upon listing the members of "/col". + reported upon listing the members of "/col". In cases where a server + treats a set of segments as equivalent, the server MUST expose only + one preferred segment per mapping, consistently chosen, in PROPFIND + responses. 6. Locking The ability to lock a resource provides a mechanism for serializing access to that resource. Using a lock, an authoring client can provide a reasonable guarantee that another principal will not modify a resource while it is being edited. In this way, a client can prevent the "lost update" problem. This specification allows locks to vary over two client-specified @@ -766,48 +786,48 @@ and the type of access to be granted. This document defines locking for only one access type, write. However, the syntax is extensible, and permits the eventual specification of locking for other access types. 6.1. Lock Model This section provides a concise model for how locking behaves. Later sections will provide more detail on some of the concepts and refer back to these model statements. Normative statements related to LOCK - and UNLOCK handling can be found in the sections on those methods, - whereas normative statements that cover any method are gathered here. + and UNLOCK method handling can be found in the sections on those + methods, whereas normative statements that cover any method are + gathered here. 1. A lock either directly or indirectly locks a resource. - 2. A resource becomes directly locked when a LOCK request to the URL + 2. A resource becomes directly locked when a LOCK request to a URL of that resource creates a new lock. The "lock-root" of the new lock is that URL. If at the time of the request, the URL is not mapped to a resource, a new empty resource is created and directly locked. 3. An exclusive lock (Section 6.2) conflicts with any other kind of lock on the same resource, whether either lock is direct or indirect. A server MUST NOT create conflicting locks on a resource. 4. For a collection that is locked with an infinite depth lock L, all member resources are indirectly locked. Changes in membership of a such a collection affect the set of indirectly locked resources: - * If an internal member resource is added to the collection, and - if the new member resource does not already have a conflicting - lock, then the resource MUST become indirectly locked by L. + * If a member resource is added to the collection, the new + member resource MUST NOT already have a conflicting lock, + because the new resource MUST become indirectly locked by L. - * If an internal member resource stops being a member of the - collection, then the resource MUST no longer be indirectly - locked by L. + * If a member resource stops being a member of the collection, + then the resource MUST no longer be indirectly locked by L. 5. Each lock is identified by a single unique lock token (Section 6.5). 6. An UNLOCK request deletes the lock with the specified lock token. After a lock is deleted, no resource is locked by that lock. 7. A lock token is "submitted" in a request when it appears in an If header (the Write Lock (Section 7) section discusses when token submission is required for write locks). @@ -884,29 +904,28 @@ by various storage repositories. These repositories require control over what sort of locking will be made available. For example, some repositories only support shared write locks while others only provide support for exclusive write locks while yet others use no locking at all. As each system is sufficiently different to merit exclusion of certain locking features, this specification leaves locking as the sole axis of negotiation within WebDAV. 6.4. Lock Creator and Privileges - The creator of a lock has special privileges to use the locked - resource. When a locked resource is modified, a server MUST check - that the authenticated principal matches the lock creator (in - addition to checking for valid lock token submission). For multi- - user shared lock cases, each authenticated principal MUST obtain its - own shared lock. + The creator of a lock has special privileges to use the lock to + modify the resource. When a locked resource is modified, a server + MUST check that the authenticated principal matches the lock creator + (in addition to checking for valid lock token submission). The server MAY allow privileged users other than the lock creator to destroy a lock (for example, the resource owner or an administrator). + The 'unlock' privilege in [RFC3744] was defined to provide that permission. There is no requirement for servers to accept LOCK requests from all users or from anonymous users. Note that having a lock does not confer full privilege to modify the locked resource. Write access and other privileges MUST be enforced through normal privilege or authentication mechanisms, not based on the possible obscurity of lock token values. @@ -927,21 +946,21 @@ 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, and also in the body of the response. Servers MAY make lock tokens publicly readable (e.g. in the DAV: lockdiscovery property). One use case for making lock tokens 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 disconnected before cleaning up the lock). Except for the case of using UNLOCK under user guidance, a client SHOULD NOT use a lock - tokens created by another client instance. + token created by another client instance. This specification encourages servers to create UUIDs for lock tokens, and to use the URI form defined by "A Universally Unique Identifier (UUID) URN Namespace" ([RFC4122]). However servers are free to use any URI (e.g. from another scheme) so long as it meets the uniqueness requirements. For example, a valid lock token might be constructed using the "opaquelocktoken" scheme defined in Appendix C. Example: "urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6" @@ -969,21 +988,21 @@ client intends to perform. For example, an applet running in a browser may need to lock a resource, but because of the instability 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 ask for a relatively small timeout value so that if the applet dies, the lock can be quickly harvested. However, a document management system is likely to ask for an extremely long timeout because its user may be planning on going off-line. A client MUST NOT assume that just because the time-out has expired - the lock has immediately been cleaned up. + the lock has immediately been removed. Likewise, a client MUST NOT assume that just because the time-out has not expired, the lock still exists. Clients MUST assume that locks can arbitrarily disappear at any time, regardless of the value given in the Timeout header. The Timeout header only indicates the behavior of the server if extraordinary circumstances do not occur. For example, a sufficiently privileged user may remove a lock at any time or the system may crash in such a way that it loses the record of the lock's existence. @@ -1003,37 +1022,30 @@ 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 who the first principal is. For this purpose the DAV:lockdiscovery property is provided. This property lists all outstanding locks, describes their type, and MAY even provide the lock tokens. Any DAV compliant resource that supports the LOCK method MUST support the DAV:lockdiscovery property. -6.9. Locks and Multiple Bindings - - A resource may be made available through more than one URI. A lock - MUST cover the resource as well as the URI to which the LOCK request - was addressed. The lock MAY cover other URIs mapped to the same - resource as well. - 7. Write Lock 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 lock type described in this specification. - An exclusive write lock will prevent parallel changes to a resource - by 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 one holding the lock). + An exclusive write lock protects a resource: it prevents changes by + 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 + one holding the lock). Clients MUST submit a lock-token they are authorized to use in any request which modifies a write-locked resource. The list of modifications covered by a write-lock include: 1. A change to any of the following aspects of any write-locked resource: * any variant, @@ -1059,21 +1071,21 @@ The next few sections describe in more specific terms how write locks interact with various operations. 7.1. Write Locks and Properties 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 change, even while locked, due to the requirements of their schemas. - Only dead properties and live properties defined to respect locks are + Only dead properties and live properties defined as lockable are guaranteed not to change while write locked. 7.2. Avoiding Lost Updates Although the write locks provide some help in preventing lost updates, they cannot guarantee that updates will never be lost. Consider the following scenario: Two clients A and B are interested in editing the resource 'index.html'. Client A is an HTTP client rather than a WebDAV @@ -1110,90 +1122,52 @@ HTTP 1.1 clients can be good citizens, avoiding overwriting other clients' changes, by using entity tags in If-Match headers with any requests that would modify resources. Information managers may attempt to prevent overwrites by implementing client-side procedures requiring locking before modifying WebDAV resources. 7.3. Write Locks and Unmapped URLs - WebDAV provides the ability to lock an unmapped URL in order to - reserve the name for use. This is a simple way to avoid the lost- - update problem on the creation of a new resource (another way is to - use If-None-Match header specified in HTTP 1.1). It has the side - benefit of locking the new resource immediately for use of the - creator. + WebDAV provides the ability to send a LOCK request to an unmapped URL + in order to reserve the name for use. This is a simple way to avoid + the lost-update problem on the creation of a new resource (another + way is to use If-None-Match header specified in Section 14.26 of + [RFC2616]). It has the side benefit of locking the new resource + immediately for use of the creator. Note that the lost-update problem is not an issue for collections because MKCOL can only be used to create a collection, not to overwrite an existing collection. When trying to lock a collection - upon creation, clients may attempt to increase the likelihood of + upon creation, clients can attempt to increase the likelihood of getting the lock by pipelining the MKCOL and LOCK requests together (but because this doesn't convert two separate operations into one atomic operation there's no guarantee this will work). A successful lock request to an unmapped URL MUST result in the - creation of an locked resource with empty content. Subsequently, a - successful PUT request (with the correct lock token) provides the - content for the resource. Note that the LOCK request has no - mechanism for the client to provide Content-Type or Content-Language, - thus the server will use defaults or empty values and rely on the - subsequent PUT request for correct values. - - The original WebDAV model for locking unmapped URLs created "lock- - null resources". This model was over-complicated and some - interoperability and implementation problems were discovered. The - new WebDAV model for locking unmapped URLs creates "locked empty - resources". Servers MUST implement either lock-null resources or - locked empty resources, but servers SHOULD implement locked empty - resources. This section discusses the original model briefly and the - new model more completely, because clients MUST be able to handle - either model. - - In the original "lock-null resource" model, which is no longer - recommended for implementation: - - o A lock-null resource sometimes appeared as "Not Found". The - server responds with a 404 or 405 to any method except for PUT, - MKCOL, OPTIONS, PROPFIND, LOCK, UNLOCK. - - o A lock-null resource does however show up as a member of its - parent collection. - - o The server removes the lock-null resource entirely (its URI - becomes unmapped) if its lock goes away before it is converted to - a regular resource. Recall that locks go away not only when they - expire or are unlcoked, but are also removed if a resource is - renamed or moved, or if any parent collection is renamed or moved. - - o The server converts the lock-null resource into a regular resource - if a PUT request to the URL is successful. - - o The server converts the lock-null resource into a collection if a - MKCOL request to the URL is successful (though interoperability - experience showed that not all servers followed this requirement). - - o Property values were defined for DAV:lockdiscovery and DAV: - supportedlock properties but not necessarily for other properties - like DAV:getcontenttype. + creation of a locked (non-collection) resource with empty content. + Subsequently, a successful PUT request (with the correct lock token) + provides the content for the resource. Note that the LOCK request + has no mechanism for the client to provide Content-Type or Content- + Language, thus the server will use defaults or empty values and rely + on the subsequent PUT request for correct values. - In the "locked empty resource" model, which is now the recommended - implementation, 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 resource created by a PUT request with an empty body (and where - a Content-Type and Content-Language was not specified), followed by a + 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 + resource created by a PUT request with an empty body (and where a + Content-Type and Content-Language was not specified), followed by a LOCK request to the same resource. Following from this model, a locked empty resource: o Can be read, deleted, moved, copied, and in all ways behave as a - regular resource, not a lock-null resource. + regular non-collection resource. o Appears as a member of its parent collection. o SHOULD NOT disappear when its lock goes away (clients must therefore be responsible for cleaning up their own mess, as with any other operation or any non-empty resource) o MAY NOT have values for properties like DAV:getcontentlanguage which haven't been specified yet by the client. @@ -1208,111 +1182,113 @@ o The response MUST indicate that a resource was created, by use of the "201 Created" response code (a LOCK request to an existing resource instead will result in 200 OK). The body must still include the DAV:lockdiscovery property, as with a LOCK request to an existing resource. The client is expected to update the locked empty resource shortly after locking it, using PUT and possibly PROPPATCH. - Clients can easily interoperate both with servers that support the - old model "lock-null resources" and the recommended model of "locked - empty resources" by only attempting PUT after a LOCK to an unmapped - URL, not MKCOL or GET. + Alternatively and for backwards compatibility to [RFC2518], servers + MAY implement Lock-Null Resources (LNRs) instead (see definition in + Appendix D). Clients can easily interoperate both with servers that + support the old model LNRs and the recommended model of "locked empty + resources" by only attempting PUT after a LOCK to an unmapped URL, + not MKCOL or GET, and by not relying on specific properties of LNRs. 7.4. Write Locks and Collections There are two kinds of collection write locks. A "Depth 0" write - lock on a collection protects the collection metadata plus the - internal member URLs of that collection, while not protecting the - content or metadata of child resources. A "Depth: infinity" write - lock on a collection provides the same protection on that collection - and also protects every descendent resource as if that resource were - itself write locked. + lock on a collection protects the collection properties plus the + internal member URLs of that one collection, while not protecting the + content or properties of member resources (if the collection itself + has any entity bodies, those are also protected). A "Depth: + infinity" write lock on a collection provides the same protection on + that collection and also provides write lock protection on every + member resource. Expressed otherwise, a write lock protects any request that would create a new resource in a write locked collection, any request that would remove an internal member URL of a write locked collection, and - any request that would change the binding name of a member URL. + any request that would change the segment name of any internal + member. Thus, a collection write lock protects all the following actions: o DELETE a collection's direct internal member, - o MOVE a member out of the collection, - - o MOVE a member into the collection, + o MOVE an internal member out of the collection, - o MOVE to rename a member within a collection, + o MOVE an internal member into the collection, - o COPY a member into a collection, and + o MOVE to rename an internal member within a collection, + o COPY an internal member into a collection, and - o PUT or MKCOL request which would create a new member. + o PUT or MKCOL request which would create a new internal member. The collection's lock token is required in addition to the lock token on the internal member itself, if it is locked separately. In addition, a depth-infinity lock affects all write operations to - all descendents of the locked collection. With a depth-infinity - lock, the root of the lock is directly locked, and all its - descendants are indirectly locked. + all members of the locked collection. With a depth-infinity lock, + the resource identified by the root of the lock is directly locked, + and all its members are indirectly locked. o Any new resource added as a descendent of a depth-infinity locked collection becomes indirectly locked. o Any indirectly locked resource moved out of the locked collection into an unlocked collection is thereafter unlocked. o Any indirectly locked resource moved out of a locked source collection into a depth-infinity locked target collection remains - indirectly locked but is now within the scope of the lock on the - target collection (the target collection's lock token will - thereafter be required to make further changes). + indirectly locked but is now protected by the lock on the target + collection (the target collection's lock token will thereafter be + required to make further changes). If a depth-infinity write LOCK request is issued to a collection containing member URLs identifying resources that are currently locked in a manner which conflicts with the new lock (see Section 6.1 point 3), the request MUST fail with a 423 (Locked) status code, and the response SHOULD contain the 'no-conflicting-lock' precondition. 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 - new resource MUST be automatically added to the lock. This is the - only mechanism that allows a resource to be added to a write lock. - Thus, for example, if the collection /a/b/ is write locked and the - resource /c is moved to /a/b/c then resource /a/b/c will be added to - the write lock. + new resource MUST be automatically protected by the lock. For + example, if the collection /a/b/ is write locked and the resource /c + is moved to /a/b/c then resource /a/b/c will be added to the write + lock. 7.5. Write Locks and the If Request Header - If a user agent is not required to have knowledge about a lock when - requesting an operation on a locked resource, the following scenario - might occur. Program A, run by User A, takes out a write lock on a - resource. Program B, also run by User A, has no knowledge of the - lock taken out by Program A, yet performs a PUT to the locked - resource. In this scenario, the PUT succeeds because locks are - associated with a principal, not a program, and thus program B, - because it is acting with principal A's credential, is allowed to - perform the PUT. However, had program B known about the lock, it - would not have overwritten the resource, preferring instead to - present a dialog box describing the conflict to the user. Due to + A user agent has to demonstrate knowledge of a lock when requesting + an operation on a locked resource. Otherwise, the following scenario + 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 + knowledge of the lock taken out by program A, yet performs a PUT to + the locked resource. In this scenario, the PUT succeeds because + locks are associated with a principal, not a program, and thus + program B, because it is acting with principal A's credential, is + allowed to perform the PUT. However, had program B known about the + lock, it would not have overwritten the resource, preferring instead + to present a dialog box describing the conflict to the user. Due to this scenario, a mechanism is needed to prevent different programs from accidentally ignoring locks taken out by other programs with the same authorization. In order to prevent these collisions a lock token MUST be submitted 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 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 - 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. 7.5.1. Example - Write Lock and COPY >>Request COPY /~fielding/index.html HTTP/1.1 Host: www.example.com Destination: http://www.example.com/users/f/fielding/index.html If: @@ -1396,21 +1372,21 @@ in Section 7.5, an If header must be submitted containing a lock token for both the source and destination. 7.7. Refreshing Write Locks A client MUST NOT submit the same write lock request twice. Note 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 order to make the request for a resource that is already locked. - However, a client may submit a LOCK method with an If header but + However, a client may submit a LOCK request with an If header but without a body. This form of LOCK MUST only be used to "refresh" a lock. Meaning, at minimum, that any timers associated with the lock MUST be re-set. Clients may submit Timeout headers of arbitrary value with their lock refresh requests. Servers, as always, may ignore Timeout headers submitted by the client, and a server MAY refresh a lock with a timeout period that is different than the previous timeout period used for the lock, provided it advertises the new value in the LOCK refresh response. @@ -1480,21 +1456,21 @@ reference, which is resolved against the Request-URI, or a full URI. A server MUST ensure that every 'href' value within a Multi-Status response uses the same format. WebDAV only uses one form of relative reference in its extensions, the absolute path. Simple-ref = absolute-URI | ( path-absolute [ "?" query ] ) The absolute-URI, path-absolute and query productions are defined in - section 4.3, 3.3 and 3.4 of [RFC3986]. + Section 4.3, 3.3 and 3.4 of [RFC3986]. Within Simple-ref productions, senders MUST NOT: o use dot-segments ("." or ".."), or o have prefixes that do not match the Request-URI (using the comparison rules defined in Section 3.2.3 of [RFC2616]). Identifiers for collections SHOULD end in a '/' character. @@ -1523,28 +1499,29 @@ legal URI may still contain characters that need to be escaped within XML character data, such as the ampersand character. 8.4. Required Bodies in Requests 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 where a request body is present but would be ignored by a server, the server MUST reject the request with 415 (Unsupported Media Type). This informs the client (which may have been attempting to use an - extension) that the body could not be processed as they intended. + extension) that the body could not be processed as the client + intended. 8.5. HTTP Headers for use in WebDAV HTTP defines many headers that can be used in WebDAV requests and responses. Not all of these are appropriate in all situations and 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]). The server MUST do authorization checks before checking any HTTP conditional header. 8.6. ETag HTTP 1.1 recommends the use of ETags rather than modification dates, for cache-control, and there are even stronger reasons to prefer ETags for authoring. Correct use of ETags is even more important in @@ -1581,27 +1558,27 @@ 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 contents of the resource. There is no similar way to tell if properties have changed. 8.7. Including error response bodies HTTP and WebDAV did not use the bodies of most error responses for machine-parsable information until DeltaV introduced a mechanism to include more specific information in the body of an error response - (section 1.6 of [RFC3253]). The error body mechanism is appropriate + (Section 1.6 of [RFC3253]). The error body mechanism is appropriate to use with any error response that may take a body but does not already have a body defined. The mechanism is particularly appropriate when a status code can mean many things (for example, 400 Bad Request can mean required headers are missing, headers are incorrectly formatted, or much more). This error body mechanism is - covered in Section 16 + covered in Section 16. 8.8. Impact of Namespace Operations on Cache Validators Note that the HTTP response headers "Etag" and "Last-Modified" (see [RFC2616], Sections 14.19 and 14.29) are defined per URL (not per resource), and are used by clients for caching. Therefore servers must ensure that executing any operation that affects the URL namespace (such as COPY, MOVE, DELETE, PUT or MKCOL) does preserve their semantics, in particular: @@ -1705,46 +1682,48 @@ property of a given name, so the property may only show up once in PROPFIND responses. Properties may be subject to access control. In the case of 'allprop' and 'propname' requests, if a principal does not have the right to know whether a particular property exists then the property MAY be silently excluded from the response. Some PROPFIND results MAY be cached, with care as there is no cache 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 This section, as with similar sections for other methods, provides some guidance on error codes and preconditions or postconditions (defined in Section 16) that might be particularly useful with PROPFIND. 403 Forbidden - A server MAY reject PROPFIND requests on collections with depth header of "Infinity", in which case it SHOULD use this error with the precondition code 'propfind-finite-depth' inside the error body. -9.1.2. Status codes for use with 207 (Multi-Status) +9.1.2. Status Codes for use in 'propstat' Element - The following are examples of response codes one would expect to be - used in a 207 (Multi-Status) response for this method. Note, - however, that unless explicitly prohibited any 2/3/4/5xx series - response code may be used in a 207 (Multi-Status) response. + In PROPFIND responses, information about individual properties is + returned inside 'propstat' elements (see Section 14.22), each + containing an individual 'status' element containing information + about the properties appearing in it. The list below summarizes the + most common status codes used inside 'propstat', however clients + should be prepared to handle other 2/3/4/5xx series status codes as + well. - 200 OK - A property exists and/or its value is successfully - returned. + 200 OK - A property exists and/or its value is successfully returned. - 401 Unauthorized - The property cannot be viewed without - appropriate authorization. + 401 Unauthorized - The property cannot be viewed without appropriate + authorization. 403 Forbidden - The property cannot be viewed regardless of authentication. 404 Not Found - The property does not exist. 9.1.3. Example - Retrieving Named Properties >>Request @@ -1795,43 +1774,44 @@ In this example, PROPFIND is executed on a non-collection resource http://www.example.com/file. The propfind XML element specifies the name of four properties whose values are being requested. In this case only two properties were returned, since the principal issuing the request did not have sufficient access rights to see the third and fourth properties. -9.1.4. Example - Retrieving Named and Dead Properties +9.1.4. Example - Using so-called 'allprop' >>Request PROPFIND /mycol/ HTTP/1.1 Host: www.example.com Depth: 1 - Content-type: application/xml; charset="utf-8" + Content-Type: application/xml; charset="utf-8" Content-Length: xxxx - + + - - + - In this example, PROPFIND is executed on a collection resource - http://www.example.com/mycol/. The client requests the values of two - specific live properties plus all dead properties (names and values). - The response is not shown. + In this example, PROPFIND is executed on the resource + http://www.example.com/mycol/ and its internal member resources. The + client requests the values of all live properties defined in this + specification, plus all dead properties, plus two more live + properties defined in [RFC3253]. The response is not shown. 9.1.5. Example - Using 'propname' to Retrieve all Property Names >>Request PROPFIND /container/ HTTP/1.1 Host: www.example.com Content-Type: application/xml; charset="utf-8" Content-Length: xxxx @@ -2035,49 +2015,51 @@ identified by the Request-URI. All DAV compliant resources MUST support the PROPPATCH method and MUST process instructions that are specified using the propertyupdate, set, and remove XML elements. Execution of the directives in this method is, of course, subject to access control constraints. DAV compliant resources SHOULD support the setting of arbitrary dead properties. The request message body of a PROPPATCH method MUST contain the - propertyupdate XML element. Clients SHOULD NOT alter the same - property more than once in a single PROPPATCH request. + propertyupdate XML element. Servers MUST process PROPPATCH instructions in document order (an exception to the normal rule that ordering is irrelevant). Instructions MUST either all be executed or none executed. Thus if any error occurs during processing all executed instructions MUST be undone and a proper error result returned. Instruction processing details can be found in the definition of the set and remove instructions in Section 14.23 and Section 14.26. - This method is idempotent, but not safe (see section 9.1 of + This method is idempotent, but not safe (see Section 9.1 of [RFC2616]). Responses to this method MUST NOT be cached. -9.2.1. Status Codes for use in 207 (Multi-Status) +9.2.1. Status Codes for use in 'propstat' Element - The following are examples of response codes one would expect to be - used in a 207 (Multi-Status) response for this method. Note, - however, that unless explicitly prohibited any 2/3/4/5xx series - response code may be used in a 207 (Multi-Status) response. + In PROPPATCH responses, information about individual properties is + returned inside 'propstat' elements (see Section 14.22), each + containing an individual 'status' element containing information + about the properties appearing in it. The list below summarizes the + most common status codes used inside 'propstat', however clients + should be prepared to handle other 2/3/4/5xx series status codes as + well. 200 (OK) - The property set or change succeeded. Note that if this appears for one property, it appears for every property in the response, due to the atomicity of PROPPATCH. 403 (Forbidden) - The client, for reasons the server chooses not to specify, cannot alter one of the properties. - 403 (Forbidden): The client has attempted to set a read-only + 403 (Forbidden): The client has attempted to set a protected property, such as DAV:getetag. If returning this error, the server SHOULD use the precondition code 'cannot-modify-protected-property' inside the response body. 409 (Conflict) - The client has provided a value whose semantics are not appropriate for the property. 424 (Failed Dependency) - The property change could not be made because of another property change that failed. @@ -2142,42 +2124,42 @@ were not for the conflict with removing the Copyright-Owner property. 9.3. MKCOL Method The MKCOL method is used to create a new collection. All WebDAV compliant resources MUST support the MKCOL method. MKCOL creates a new collection resource at the location specified by the Request-URI. If the Request-URI is already mapped to a resource then the MKCOL MUST fail. During MKCOL processing, a server MUST - make the Request-URI a member of its parent collection, unless the - Request-URI is "/". If no such ancestor exists, the method MUST - fail. When the MKCOL operation creates a new collection resource, - all ancestors MUST already exist, or the method MUST fail 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 request - must fail. + make the Request-URI an internal member of its parent collection, + unless the Request-URI is "/". If no such ancestor exists, the + method MUST fail. When the MKCOL operation creates a new collection + resource, all ancestors MUST already exist, or the method MUST fail + 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 + request must fail. When MKCOL is invoked without a request body, the newly created collection SHOULD have no members. A MKCOL request message may contain a message body. The precise behavior of a MKCOL request when the body is present is undefined, but limited to creating collections, members of a collection, bodies of members and properties on the collections or members. If the server receives a MKCOL request entity type it does not support or understand it MUST respond with a 415 (Unsupported Media Type) status code. If the server decides to reject the request based on the presence of an entity or the type of an entity, it should use the 415 (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. 9.3.1. MKCOL Status Codes In addition to the general status codes possible, the following status codes have specific applicability to MKCOL: 201 (Created) - The collection was created. 403 (Forbidden) - This indicates at least one of two conditions: 1) @@ -2232,21 +2214,21 @@ 9.5. POST for Collections Since by definition the actual function performed by POST is determined by the server and often depends on the particular resource, the behavior of POST when applied to collections cannot be meaningfully modified because it is largely undefined. Thus the semantics of POST are unmodified when applied to a collection. 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 handling requirements. A server processing a successful DELETE request: MUST destroy locks rooted on the deleted resource MUST remove the mapping from the Request-URI to any resource. Thus, after a successful DELETE operation (and in the absence of @@ -2266,27 +2248,27 @@ If any resource identified by a member URL cannot be deleted then all of the member's ancestors MUST NOT be deleted, so as to maintain URL namespace consistency. Any headers included with DELETE MUST be applied in processing every resource to be deleted. When the DELETE method has completed processing it MUST result in a consistent URL namespace. - If an error occurs deleting an internal resource (a resource other - than the resource identified in the Request-URI) then the response - can be a 207 (Multi-Status). Multi-Status is used here to indicate - which internal resources could NOT be deleted, including an error - code which should help the client understand which resources caused - the failure. For example, the Multi-Status body could include a - response with status 423 (Locked) if an internal resource was locked. + If an error occurs deleting a member resource (a resource other than + the resource identified in the Request-URI) then the response can be + a 207 (Multi-Status). Multi-Status is used here to indicate which + internal resources could NOT be deleted, including an error code + which should help the client understand which resources caused the + failure. For example, the Multi-Status body could include a response + with status 423 (Locked) if an internal resource was locked. The server MAY return a 4xx status response, rather than a 207, if the request failed completely. 424 (Failed Dependency) status codes SHOULD NOT be in the 207 (Multi- Status) response for DELETE. They can be safely left out because the client will know that the ancestors of a resource could not be deleted when the client receives an error for the ancestor's progeny. Additionally 204 (No Content) errors SHOULD NOT be returned in the 207 (Multi-Status). The reason for this prohibition is that 204 (No @@ -2337,21 +2319,21 @@ A PUT that would result in the creation of a resource without an appropriately scoped parent collection MUST fail with a 409 (Conflict). A PUT request is the only way a client has to indicate to the server what Content-Type a resource should have, and whether it should change if the resource is overwritten. Thus, a client SHOULD provide a Content-Type for a new resource if any is known. If the client does not provide a Content-Type for a new resource, the server MAY create a resource with no Content-Type assigned, or it MAY attempt to - assign a reasonable and legal Content-Type. + assign a Content-Type. Note that although a recipient should treat metadata supplied with an HTTP request as authorative, in practice there's no guarantee that a server will accept Content- headers. Many servers do not allow configuring the Content-Type on a per-resource basis in the first place. Thus, clients should not rely on the ability to directly influence the content type by including a Content-Type request header. 9.7.2. PUT for Collections @@ -2369,56 +2351,56 @@ in the Destination header. The Destination header MUST be present. The exact behavior of the COPY method depends on the type of the source resource. All WebDAV compliant resources MUST support the COPY method. However, support for the COPY method does not guarantee the ability to copy a resource. For example, separate programs may control 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. - 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. 9.8.1. COPY for Non-collection Resources 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 state and behavior match that of the source resource as closely as possible. Since the environment at the destination may be different than at the source due to factors outside the scope of control of the server, such as the absence of resources required for correct operation, it may not be possible to completely duplicate the behavior of the resource at the destination. Subsequent alterations to the destination resource will not modify the source resource. Subsequent alterations to the source resource will not modify the destination resource. 9.8.2. COPY for Properties After a successful COPY invocation, all dead properties on the source - resource MUST be duplicated on the destination resource, along with - all properties as appropriate. Live properties described in this - document SHOULD be duplicated as identically behaving live properties - at the destination resource, but not necessarily with the same - values. Servers SHOULD NOT convert live properties into dead - properties on the destination resource, because clients may then draw - incorrect conclusions about the state or functionality of a resource. - Note that some live properties are 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), and in these cases, a successful - COPY might result in the property being reported as "Not Found" in - subsequent requests. + resource SHOULD be duplicated on the destination resource. Live + properties described in this document SHOULD be duplicated as + identically behaving live properties at the destination resource, but + not necessarily with the same values. Servers SHOULD NOT convert + live properties into dead properties on the destination resource, + because clients may then draw incorrect conclusions about the state + or functionality of a resource. Note that some live properties are + 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), + and in these cases, a successful COPY might result in the property + being reported as "Not Found" in subsequent requests. - A COPY operation creates a new resource, much like a PUT operation - does. Live properties which are related to resource creation (such - as DAV:creationdate) should have their values set accordingly. + When the destination is an unmapped URL, a COPY operation creates a + new resource much like a PUT operation does. Live properties which + are related to resource creation (such as DAV:creationdate) should + have their values set accordingly. 9.8.3. COPY for Collections 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 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 header behaviors on WebDAV-compliant resources. A COPY of depth infinity instructs that the collection resource @@ -2596,57 +2578,59 @@ HTTP/1.1 207 Multi-Status Content-Type: application/xml; charset="utf-8" Content-Length: xxxx http://www.example.com/othercontainer/R2/ HTTP/1.1 423 Locked + 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 submitted. In this example most of the resources, along with the collection, were copied successfully. However the collection R2 failed because the destination R2 is locked. Because there was an error copying R2, none of R2's members were copied. However no errors were listed for those members due to the error minimization rules. 9.9. MOVE Method The MOVE operation on a non-collection resource is the logical equivalent of a copy (COPY), followed by consistency maintenance processing, followed by a delete of the source, where all three - actions are performed atomically. The consistency maintenance step - allows the server to perform updates caused by the move, such as - updating all URLs other than the Request-URI which identify the - source resource, to point to the new destination resource. - Consequently, the Destination header MUST be present on all MOVE - methods and MUST follow all COPY requirements for the COPY part of - the MOVE method. All WebDAV compliant resources MUST support the - MOVE method. However, support for the MOVE method does not guarantee - the ability to move a resource to a particular destination. + actions are performed in a single operation. The consistency + maintenance step allows the server to perform updates caused by the + move, such as updating all URLs other than the Request-URI which + identify the source resource, to point to the new destination + resource. - For example, separate programs may actually control different sets of - resources on the same server. Therefore, it may not be possible to - move a resource within a namespace that appears to belong to the same - server. + The Destination header MUST be present on all MOVE methods and MUST + follow all COPY requirements for the COPY part of 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 + resource to a particular destination. For example, separate programs + may actually control different sets of resources on the same server. + Therefore, it may not be possible to move a resource within a + namespace that appears to belong to the same server. If a resource exists at the destination, the destination resource will be deleted as a side-effect of the MOVE operation, subject to 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. 9.9.1. MOVE for Properties Live properties described in this document SHOULD be moved along with the resource, such that the resource has identically behaving live properties at the destination resource, but not necessarily with the 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 one meaning if present and the opposite if absent), and in these @@ -2741,22 +2725,22 @@ and destination resources are the same. 409 (Conflict) - A resource cannot be created at the destination until one or more intermediate collections have been created. The server MUST NOT create those intermediate collections automatically. Or, the server was unable to preserve the behavior of the live properties and still move the resource to the destination (see 'preserved-live-properties' postcondition). 412 (Precondition Failed) - A condition header failed. Specific to - MOVE, this could mean that the Overwrite header is "F" and the state - of the destination URL is already mapped to a resource. + MOVE, this could mean that the Overwrite header is "F" and the + destination URL is already mapped to a resource. 423 (Locked) - The source or the destination resource, the source or destination resource parent, or some resource within the source or destination collection, was locked. This response SHOULD contain the 'lock-token-submitted' precondition element. 502 (Bad Gateway) - This may occur when the destination is on another server and the destination server refuses to accept the resource. This could also occur when the destination is on another sub-section of the same server namespace. @@ -2796,20 +2781,21 @@ HTTP/1.1 207 Multi-Status Content-Type: application/xml; charset="utf-8" Content-Length: xxxx http://www.example.com/othercontainer/C2/ HTTP/1.1 423 Locked + In this example the client has submitted a number of lock tokens with the request. A lock token will need to be submitted for every resource, both source and destination, anywhere in the scope of the method, that is locked. In this case the proper lock token was not submitted for the destination http://www.example.com/othercontainer/C2/. This means that the resource /container/C2/ could not be moved. Because there was an @@ -2823,85 +2809,79 @@ 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. These sections on the LOCK method describe only those semantics that are specific to the LOCK method and are independent of the access type of the lock being requested. Any resource which supports the LOCK method MUST, at minimum, support 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. 9.10.1. Creating a lock on existing resource A LOCK request to an existing resource will create a lock on the resource identified by the Request-URI, provided the resource is not already locked with a conflicting lock. The resource identified in the Request-URI becomes the root of the lock. Lock method requests - to create a new lock MUST have a XML request body. The server MUST + to create a new lock MUST have an XML request body. The server MUST preserve the information provided by the client in the 'owner' field in the request body when the lock information is requested. The LOCK request MAY have a Timeout header. When a new lock is created, the LOCK response: o MUST contain a body with the value of the DAV:lockdiscovery property in a prop XML element. This MUST contain the full information about the lock just granted, while information about other (shared) locks is OPTIONAL. o MUST include the Lock-Token response header with the token associated with the new lock. 9.10.2. Refreshing Locks A lock is refreshed by sending a LOCK request to the URL of a resource within the scope of the lock. This request MUST NOT have a - body and it MUST specify which lock to refresh by using the 'Lock- - Token' header with a single lock token (only one lock may be - refreshed at a time). It MAY contain a Timeout header, which a - server MAY accept to change the duration remaining on the lock to the - new value. A server MUST ignore the Depth header on a LOCK refresh. + body and it MUST specify which lock to refresh by using the 'If' + header with a single lock token (only one lock may be refreshed at a + time). The request MAY contain a Timeout header, which a server MAY + accept to change the duration remaining on the lock to the new value. + A server MUST ignore the Depth header on a LOCK refresh. If the resource has other (shared) locks, those locks are unaffected by a lock refresh. Additionally, those locks do not prevent the named lock from being refreshed. - Note that in [RFC2518], clients were indicated through the example in - the text to use the If header to specify what lock to refresh (rather - than the Lock-Token header). Servers are encouraged to continue to - support this as well as the Lock-Token header. - - Note that the Lock-Token header is not returned in the response for a + The Lock-Token header is not returned in the response for a successful refresh LOCK request, but the LOCK response body MUST contain the new value for the DAV:lockdiscovery body. 9.10.3. Depth and Locking 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 method. All resources that support the LOCK method MUST support the Depth header. A Depth header of value 0 means to just lock the resource specified by the Request-URI. If the Depth header is set to infinity then the resource specified in - the Request-URI along with all its internal members, all the way down - the hierarchy, are to be locked. A successful result MUST return a - single lock token which represents all the resources that have been - locked. If an UNLOCK is successfully executed on this token, all - associated resources are unlocked. Hence, partial success is not an - option. Either the entire hierarchy is locked or no resources are - locked. + the Request-URI along with all its members, all the way down the + hierarchy, are to be locked. A successful result MUST return a + single lock token. Similarly, if an UNLOCK is successfully executed + on this token, all associated resources are unlocked. Hence, partial + success is not an option for LOCK or UNLOCK. Either the entire + hierarchy is locked or no resources are locked. If the lock cannot be granted to all resources, the server MUST return a Multi-Status response with a 'response' element for at least one resource which prevented the lock from being granted, along with a suitable status code for that failure (e.g. 403 (Forbidden) or 423 (Locked)). Additionally, if the resource causing the failure was not the resource requested, then the server SHOULD include a 'response' element for the Request-URI as well, with a 'status' element containing 424 Failed Dependency. @@ -2960,27 +2940,27 @@ 409 (Conflict) - A resource cannot be created at the destination until one or more intermediate collections have been created. The server MUST NOT create those intermediate collections automatically. 423 (Locked), potentially with 'no-conflicting-lock' precondition code - There is already a lock on the resource which is not compatible with the requested lock (see lock compatibility table above). - 409 (Conflict), with 'lock-token-matches-request-uri' precondition - code - The LOCK request was made with a Lock-Token header, indicating - that the client wishes to refresh the given 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 include the - Request-URI, or the lock could have disappeared, or the token may be - invalid. + 412 (Precondition Failed), with 'lock-token-matches-request-uri' + precondition code - The LOCK request was made with a If header, + indicating that the client wishes to refresh the given 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 + include the Request-URI, or the lock could have disappeared, or the + token may be invalid. 9.10.7. Example - Simple Lock Request >>Request LOCK /workspace/webdav/proposal.doc HTTP/1.1 Host: example.com Timeout: Infinite, Second-4100000000 Content-Type: application/xml; charset="utf-8" Content-Length: xxxx @@ -3147,35 +3127,34 @@ The UNLOCK method removes the lock identified by the lock token in the Lock-Token request header. The Request-URI MUST identify a resource within the scope of the lock. Note that use of Lock-Token header to provide the lock token is not consistent with other state-changing methods which all require an If header with the lock token. Thus, the If header is not needed to provide the lock token. Naturally when the If header is present it has its normal meaning as a conditional header. - For a successful response to this method, the server MUST remove the - lock from the resource identified by the Request-URI and from all - other resources included in the lock. + For a successful response to this method, the server MUST delete the + lock entirely. If all resources which have been locked under the submitted lock token can not be unlocked then the UNLOCK request MUST fail. A successful response to an UNLOCK method does not mean that the resource is necessarily unlocked. It means that the specific lock corresponding to the specified token no longer exists. Any DAV compliant resource which supports the LOCK method MUST support the UNLOCK method. - This method is idempotent, but not safe (see section 9.1 of + This method is idempotent, but not safe (see Section 9.1 of [RFC2616]). Responses to this method MUST NOT be cached. 9.11.1. Status Codes In addition to the general status codes possible, the following status codes have specific applicability to UNLOCK: 204 (No Content) - Normal success response (rather than 200 OK, since 200 OK would imply a response body, and an UNLOCK success response does not normally contain a body) @@ -3202,33 +3181,34 @@ >>Response HTTP/1.1 204 No Content In this example, the lock identified by the lock token "urn:uuid:a515cfa4-5da4-22e1-f5b5-00a0451e6bf7" is successfully removed from the resource http://example.com/workspace/webdav/info.doc. If this lock included more than just one resource, the lock is removed from all resources - included in the lock. The 204 (No Content) status code is used - instead of 200 (OK) because there is no response entity body. + included in the lock. In this example, the nonce, response, and opaque fields have not been calculated in the Authorization request header. 10. HTTP Headers for Distributed Authoring All DAV headers follow the same basic formatting rules as HTTP headers. This includes rules like line continuation and how to combine (or separate) multiple instances of the same header using - commas. WebDAV adds two new conditional headers to the set defined - in HTTP: the If and Overwrite headers. + commas. + + WebDAV adds two new conditional headers to the set defined in HTTP: + the If and Overwrite headers. 10.1. DAV Header DAV = "DAV" ":" #( compliance-class ) compliance-class = ( "1" | "2" | "3" | extend ) extend = Coded-URL | token Coded-URL = "<" absolute-URI ">" ; No LWS allowed in Coded-URL ; absolute-URI is defined in RFC3986 @@ -3263,22 +3243,22 @@ this as a request header will need to carefully consider caching implications. 10.2. Depth Header Depth = "Depth" ":" ("0" | "1" | "infinity") The Depth request header is used with methods executed on resources which could potentially have internal members to indicate whether the method is to be applied only to the resource ("Depth: 0"), to the - resource and its immediate children, ("Depth: 1"), or the resource - and all its progeny ("Depth: infinity"). + resource and its internal members only, ("Depth: 1"), or the resource + and all its members ("Depth: infinity"). The Depth header is only supported if a method's definition explicitly provides for such support. The following rules are the default behavior for any method that supports the Depth header. A method may override these defaults by defining different behavior in its definition. Methods which support the Depth header may choose not to support all of the header's values and may define, on a case by case basis, the @@ -3302,43 +3282,37 @@ 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 specific Depth behavior is defined for that header. If a resource, source or destination, within the scope of the method with a Depth header is locked in such a way as to prevent the successful execution of the method, then the lock token for that resource MUST be submitted with the request in the If request header. The Depth header only specifies the behavior of the method with - regards to internal children. If a resource does not have internal - children then the Depth header MUST be ignored. - - Please note, however, that it is always an error to submit a value - for the Depth header that is not allowed by the method's definition. - Thus submitting a "Depth: 1" on a COPY, even if the resource does not - have internal members, will result in a 400 (Bad Request). The - method should fail not because the resource doesn't have internal - members, but because of the illegal value in the header. + regards to internal members. If a resource does not have internal + members then the Depth header MUST be ignored. 10.3. Destination Header The Destination request header specifies the URI which identifies a destination resource for methods such as COPY and MOVE, which take two URIs as parameters. Destination = "Destination" ":" Simple-ref - If the Destination value is an absolute URI, it may name a different - server (or different port or scheme). If the source server cannot - attempt a copy to the remote server, it MUST fail the request. Note - that copying and moving resources to remote servers is not fully - defined in this specification (e.g. specific error conditions). + If the Destination value is an absolute-URI (Section 4.3 of + [RFC3986]), it may name a different server (or different port or + scheme). If the source server cannot attempt a copy to the remote + server, it MUST fail the request. Note that copying and moving + resources to remote servers is not fully defined in this + specification (e.g. specific error conditions). If the Destination value is too long or otherwise unacceptable, the server SHOULD return 400 (Bad Request), ideally with helpful information in an error body. 10.4. If Header 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 header handles any state token as well as ETags. A typical @@ -3352,24 +3326,24 @@ o The first purpose is to make a request conditional by supplying a series of state lists with conditions that match tokens and ETags to specific resource. If this header is evaluated and all state lists fail, then the request MUST fail with a 412 (Precondition Failed) status. On the other hand, the request can succeed only if one of the described state lists succeeds. The success criteria for state lists and matching functions are defined in Section 10.4.3 and Section 10.4.4. o Additionally, the mere fact that a state token appears in an If - header means that is has been "submitted" with the request. In + header means that it has been "submitted" with the request. In general, this is used to indicate that the client has knowledge of - that state token. The meaning of submitting a state token depends - on its type (for lock tokens, please refer to Section 6). + that state token. The semantics for submitting a state token + depend on its type (for lock tokens, please refer to Section 6). Note that these two purposes need to be treated distinctly: a state token counts as being submitted independently of whether the server actually has evaluated the state list it appears in, and also independently of whether the condition it expressed was found to be true or not. 10.4.2. Syntax If = "If" ":" ( 1*No-tag-list | 1*Tagged-list ) @@ -3595,27 +3569,28 @@ indicate the lock token created as a result of a successful LOCK request to create a new lock. 10.6. Overwrite Header Overwrite = "Overwrite" ":" ("T" | "F") The Overwrite request header specifies whether the server should 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 - COPY or MOVE operation if the state of the destination URL does map - to a resource. 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 header of value "T". While the Overwrite header appears to - duplicate the functionality of the If-Match: * header of HTTP/1.1, - If-Match applies only to the Request-URI, and not to the Destination - of a COPY or MOVE. + 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 + then the resource MUST treat the request as if it has an overwrite + header of value "T". While the Overwrite header appears to duplicate + the functionality of the If-Match: * header of HTTP/1.1, If-Match + applies only to the Request-URI, and not to the Destination of a COPY + or MOVE. 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 code. The server MUST do authorization checks before checking this or any conditional header. All DAV compliant resources MUST support the Overwrite header. 10.7. Timeout Request Header @@ -3683,56 +3658,75 @@ action. 12. Use of HTTP Status Codes These HTTP codes are not redefined, but their use is somewhat extended by WebDAV methods and requirements. In general, many HTTP status codes can be used in response to any request, not just in cases described in this document. Note also that WebDAV servers are known to use 300-level redirect responses (and early interoperability tests found clients unprepared to see those responses). A 300-level - request MUST NOT be used when the server has created a new resource + response MUST NOT be used when the server has created a new resource in response to the request. 12.1. 412 Precondition Failed Any request can contain a conditional header defined in HTTP (If- Match, If-Modified-Since, etc.) or the "If" or "Overwrite" conditional headers defined in this specification. If the server evaluates a conditional header, and if that condition fails to hold, then this error code MUST be returned. On the other hand, if the client did not include a conditional header in the request, then the - server MUST NOT use this error. + server MUST NOT use this status code. 12.2. 414 Request-URI Too Long This status code is used in HTTP 1.1 only for Request-URIs, not URIs in other locations. 13. Multi-Status Response - A Multi-Status response contains one 'response' element for each - resource in the scope of the request (in no required order) or MAY be - empty if no resources match the request. The default 207 (Multi- - Status) response body is a text/xml or application/xml HTTP entity - that contains a single XML element called 'multistatus', which - contains a set of XML elements called response which contain 200, - 300, 400, and 500 series status codes generated during the method - invocation. 100 series status codes SHOULD NOT be recorded in a - 'response' XML element. The 207 status code itself MUST NOT be - considered a success response, it is only completely successful if - all 'response' elements inside contain success status codes. + A Multi-Status response conveys information about multiple resources + in situations where multiple status codes might be appropriate. The + default Multi-Status response body is a text/xml or application/xml + HTTP entity with a 'multistatus' root element. Further elements + contain 200, 300, 400, and 500 series status codes generated during + the method invocation. 100 series status codes SHOULD NOT be recorded + in a 'response' XML element. - The body of a 207 Multi-Status response MUST contain a URL associated - with each specific status code, so that the client can tell whether - the error occurred with the source resource, destination resource or - some other resource in the scope of the request. + Although '207' is used as the overall response status code, the + recipient needs to consult the contents of the multistatus response + body for further information about the success or failure of the + method execution. The response MAY be used in success, partial + success and also in failure situations. + + The 'multistatus' root element holds zero or more 'response' elements + in any order, each with information about an individual resource. + Each 'response' element MUST have an 'href' element to identify the + resource. + + A Multi-Status response uses one out of two distinct formats for + representing the status: + + 1. A 'status' element as child of the 'response' element indicates + the status of the message excecution for the identified resource + as a whole (for instance, see Section 9.6.2). Some method + definitions provide information about specific status codes + clients should be prepared to see in a response. However, + clients MUST be able to handle other status codes, using the + generic rules defined in Section 10 of [RFC2616]. + + 2. For PROPFIND and PROPPATCH, the format has been extended using + the 'propstat' element instead of 'status', providing information + about individual properties of a resource. This format is + specific to PROPFIND and PROPPATCH, and is described in detail in + Section 9.1 and Section 9.2. 13.1. Response headers 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 successful PUT requests or in redirect responses). However, use of this header creates ambiguity when there are URLs in the body of the response, as with Multi-Status. Thus, use of the Location header with the Multi-Status response is intentionally undefined. @@ -3760,27 +3754,23 @@ Section 9.9.2 define various status codes used in Multi-Status responses. This specification does not define the meaning of other status codes that could appear in these responses. 14. XML Element Definitions In this section, the final line of each section gives the element type declaration using the format defined in [REC-XML]. The "Value" field, where present, specifies further restrictions on the allowable contents of the XML element using BNF (i.e., to further restrict the - values of a PCDATA element). The "Extensibility" field discusses how - the element may be extended in the future (or in existing extensions - to WebDAV. - - All of the elements defined here may be extended by the addition of - attributes and child elements not defined in this specification. All - elements defined here are in the "DAV:" namespace. + values of a PCDATA element). Note that all of the elements defined + here may be extended according to the rules defined in Section 17. + All elements defined here are in the "DAV:" namespace. 14.1. activelock XML Element Name: activelock Purpose: Describes a lock on a resource. @@ -3816,35 +3805,34 @@ 14.5. error XML Element Name: error Purpose: Error responses, particularly 403 Forbidden and 409 Conflict, sometimes need more information to indicate what went wrong. When an error response contains a body in WebDAV, the body is in XML with the root element 'error'. The 'error' element - SHOULD include an XML element with the code of a failed - precondition or postcondition. + SHOULD include a failed precondition or postcondition element. Description: Contains at least one XML element, and MUST NOT contain text or mixed content. Any element that is a child of the 'error' element is considered to be a precondition or postcondition code. Unrecognized elements SHOULD be ignored. 14.6. exclusive XML Element Name: exclusive - Purpose: Specifies an exclusive lock + Purpose: Specifies an exclusive lock. 14.7. href XML Element Name: href Purpose: MUST contain a URI or a relative reference. Description: There may be limits on the value of 'href' depending on @@ -3865,21 +3853,21 @@ resource, although possible property names are in no way limited to those property names defined in this document or other standards. This element MUST NOT contain text or mixed content. 14.9. location XML Element Name: location - Purpose: HTTP defines the "Location" header (see [RFC2616], section + Purpose: HTTP defines the "Location" header (see [RFC2616], Section 14.30) for use with some status codes (such as 201 and the 300 series codes). When these codes are used inside a 'multistatus' element, the 'location' element can be used to provide the accompanying Location header value. Description: Contains a single href element with the same value that would be used in a Location header. @@ -3900,23 +3889,23 @@ 14.12. lockroot XML Element Name: lockroot Purpose: Contains the root URL of the lock, which is the URL through which the resource was addressed in the LOCK request. - Description: The href contains a HTTP URL with the address of the - root of the lock. The server SHOULD include this in all DAV: - lockdiscovery property values and the response to LOCK requests. + Description: The href element contains the root of the lock. The + server SHOULD include this in all DAV:lockdiscovery property + values and the response to LOCK requests. 14.13. lockscope XML Element Name: lockscope Purpose: Specifies whether a lock is an exclusive lock, or a shared lock. @@ -3993,22 +3983,21 @@ 14.19. propertyupdate XML element Name: propertyupdate Purpose: Contains a request to alter the properties on a resource. Description: This XML element is a container for the information - required to modify the properties on the resource. This XML - element is multi-valued. + required to modify the properties on the resource. 14.20. propfind XML Element Name: propfind Purpose: Specifies the properties to be returned from a PROPFIND method. Four special elements are specified for use with 'propfind': 'prop', 'allprop', 'include' and 'propname'. If @@ -4022,38 +4011,37 @@ Name: propname Purpose: Specifies that only a list of property names on the resource is to be returned. 14.22. propstat XML Element Name: propstat - Purpose: Groups together a prop and status element that is associated with a particular 'href' element. Description: The propstat XML element MUST contain one prop XML element and one status XML element. The contents of the prop XML element MUST only list the names of properties to which the result in the status element applies. The optional precondition/ - postcondition error code and 'responsedescription' text also apply - to the properties named in 'prop'. + postcondition element and 'responsedescription' text also apply to + the properties named in 'prop'. 14.23. remove XML element Name: remove - Purpose: Lists the DAV properties to be removed from a resource. + Purpose: Lists the properties to be removed from a resource. Description: Remove instructs that the properties specified in prop should be removed. Specifying the removal of a property that does not exist is not an error. All the XML elements in a 'prop' XML element inside of a 'remove' XML element MUST be empty, as only the names of properties to be removed are required. 14.24. response XML Element @@ -4065,72 +4053,70 @@ Description: The 'href' element contains a HTTP URL pointing to a WebDAV resource when used in the 'response' container. A particular 'href' value MUST NOT appear more than once as the child of a 'response' XML element under a 'multistatus' XML element. This requirement is necessary in order to keep processing costs for a response to linear time. Essentially, this prevents having to search in order to group together all the responses by 'href'. There are, however, no requirements regarding ordering based on 'href' values. The optional - precondition/postcondition error code and 'responsedescription' - text can provide additional information about this resource - relative to the request or result. + precondition/postcondition element and 'responsedescription' text + can provide additional information about this resource relative to + the request or result. 14.25. responsedescription XML Element Name: responsedescription Purpose: Contains information about a status response within a Multi-Status. Description: Provides information suitable to be presented to a user. 14.26. set XML element Name: set - Purpose: Lists the DAV property values to be set for a resource. + Purpose: Lists the property values to be set for a resource. - Description: The 'set' XML element MUST contain only a prop XML - element. The elements contained by the prop XML element inside - the 'set' XML element MUST specify the name and value of - properties that are set on the resource identified by Request-URI. - If a property already exists then its value is replaced. Language - tagging information appearing in the scope of the 'prop' element - (in the "xml:lang" attribute, if present) MUST be persistently - stored along with the property, and MUST be subsequently - retrievable using PROPFIND. + Description: The 'set' element MUST contain only a 'prop' element. + The elements contained by the 'prop' element inside the 'set' + element MUST specify the name and value of properties that are set + on the resource identified by Request-URI. If a property already + exists then its value is replaced. Language tagging information + appearing in the scope of the 'prop' element (in the "xml:lang" + attribute, if present) MUST be persistently stored along with the + property, and MUST be subsequently retrievable using PROPFIND. 14.27. shared XML Element Name: shared - Purpose: Specifies a shared lock + Purpose: Specifies a shared lock. 14.28. status XML Element Name: status + Purpose: Holds a single HTTP status-line. - Purpose: Holds a single HTTP status-line - - Value: status-line (status-line defined in Section 6.1 of [RFC2616]) + Value: status-line (defined in Section 6.1 of [RFC2616]) 14.29. timeout XML Element Name: timeout Purpose: The number of seconds remaining before a lock expires. Value: TimeType (defined in Section 10.7). @@ -4162,21 +4148,21 @@ 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 computation (based on the content and other properties of that resource, or even of some other resource). A computed property is always a protected property. COPY and MOVE behavior refers to local COPY and MOVE operations. For properties defined based on HTTP GET response headers (DAV:get*), - the value could include LWS as defined in [RFC2616], section 4.2. + the value could include LWS as defined in [RFC2616], Section 4.2. Server implementors SHOULD NOT include extra LWS in these values, however client implementors MUST be prepared to handle extra LWS. 15.1. creationdate Property Name: creationdate Purpose: Records the time and date the resource was created. Value: date-time (defined in [RFC3339], see the ABNF in section @@ -4189,59 +4175,63 @@ synchronization logic (use DAV:getetag instead). COPY/MOVE behaviour: This property value SHOULD be kept during a MOVE operation, but is normally re-initialized when a resource is created with a COPY. It should not be set in a COPY. Description: The DAV:creationdate property SHOULD be defined on all DAV compliant resources. If present, it contains a timestamp of the moment when the resource was created. Servers that are 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"). 15.2. displayname Property Name: displayname Purpose: Provides a name for the resource that is suitable for presentation to a user. - Value: Any text + Value: Any text. Protected: SHOULD NOT be protected. Note that servers implementing [RFC2518] might have made this a protected property as this is a new requirement. COPY/MOVE behaviour: This property value SHOULD be preserved in COPY and MOVE operations. - Description: The DAV:displayname property should be defined on all - DAV compliant resources. If present, the property contains a - description of the resource that is suitable for presentation to a - user. This property is defined on the resource, and hence SHOULD - have the same value independent of the Request-URI used to - retrieve it (thus computing this property based on the Request-URI - is deprecated). + Description: Contains a description of the resource that is suitable + for presentation to a user. This property is defined on the + resource, and hence SHOULD have the same value independent of the + Request-URI used to retrieve it (thus computing this property + based on the Request-URI is deprecated). While generic clients + might display the property value to end users, client UI designers + must understand that the method for identifying resources is still + 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 + individual resource. Two resources can have the same DAV: + displayname value even within the same collection. 15.3. getcontentlanguage Property 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 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]). Protected: SHOULD NOT be protected, so that clients can reset the language. Note that servers implementing [RFC2518] might have made this a protected property as this is a new requirement. COPY/MOVE behaviour: This property value SHOULD be preserved in COPY and MOVE operations. Description: The DAV:getcontentlanguage property MUST be defined on @@ -4250,104 +4240,104 @@ 15.4. getcontentlength Property Name: getcontentlength Purpose: Contains the Content-Length header returned by a GET without accept headers. - Value: See section 14.13 of [RFC2616]. + Value: See Section 14.13 of [RFC2616]. Protected: This property is computed, therefore protected. Description: The DAV:getcontentlength property MUST be defined on any DAV compliant resource that returns the Content-Length header in response to a GET. COPY/MOVE behaviour: This property value is dependent on the size of the destination resource, not the value of the property on the source resource. 15.5. getcontenttype Property 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 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 content types on its own (see also discussion in Section 9.7.1). COPY/MOVE behaviour: This property value SHOULD be preserved in COPY and MOVE operations. Description: This property MUST be defined on any DAV compliant resource that returns the Content-Type header in response to a GET. 15.6. getetag Property 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 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 controlled by the server. COPY/MOVE behaviour: This property value is dependent on the final state of the destination resource, not the value of the property on the source resource. Also note the considerations in Section 8.8. Description: The getetag property MUST be defined on any DAV - compliant resource that returns the Etag header. Refer to RFC2616 - for a complete definition of the semantics of an ETag, and to - Section 8.6 for a discussion of ETags in WebDAV. + compliant resource that returns the Etag header. Refer to Section + 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. 15.7. getlastmodified Property Name: getlastmodified - Purpose: Contains the Last-Modified header value (from section 14.29 + Purpose: Contains the Last-Modified header value (from Section 14.29 of [RFC2616]) as it would be returned by a GET method 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 value for appropriate caching behavior, or on the value of the Last-Modified header to which this property is linked. COPY/MOVE behaviour: This property value is dependent on the last modified date of the destination resource, not the value of the property on the source resource. Note that some server implementations use the file system date modified value for the DAV:getlastmodified value, and this can be preserved in a MOVE even when the HTTP Last-Modified value SHOULD change. Note that since [RFC2616] requires clients to use ETags where provided, a server implementing ETags can count on clients using a much better - mechanism that modification dates for offline synchronization or + mechanism than modification dates for offline synchronization or cache control. Also note the considerations in Section 8.8. Description: Note that the last-modified date on a resource SHOULD only reflect changes in the body (the GET responses) of the resource. A change in a property only SHOULD NOT cause the last- modified date to change, because clients MAY rely on the last- modified date to know when to overwrite the existing body. The DAV:getlastmodified property MUST be defined on any DAV compliant resource that returns the Last-Modified header in response to a GET. @@ -4521,102 +4511,100 @@ HTTP/1.1 200 OK 16. Precondition/postcondition XML elements - As introduced in section Section 8.7, extra information on error - conditions can be included in the body of many status responses. - This section makes requirements on the use of the error body - mechanism and introduces a number of precondition and postcondition - codes. + As introduced in Section 8.7, extra information on error conditions + can be included in the body of many status responses. This section + makes requirements on the use of the error body mechanism and + introduces a number of precondition and postcondition codes. A "precondition" of a method describes the state of the server that must be true for that method to be performed. A "postcondition" of a method describes the state of the server that must be true after that method has been completed. Each precondition and postcondition has a unique XML element associated with it. In a 207 Multi-Status response, the XML element MUST appear inside an 'error' element in the appropriate 'propstat or 'response' element depending on whether the condition applies to one - or more properties or the resource as a whole. In all other error + or more properties or to the resource as a whole. In all other error responses, the XML element MUST be returned as the child of a top- level 'error' element in the response body, unless otherwise negotiated by the request, along with an appropriate response status. The most common response status codes are 403 (Forbidden) if the 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 the conflict and resubmit the request. The 'error' element MAY contain child elements with specific error information and MAY be extended with any custom child elements. This mechanism does not take the place of using a correct numeric - error code as defined here or in HTTP, because the client MUST always - be able to take a reasonable course of action based only on the - numeric error. However, it does remove the need to define new - numeric error codes. The machine-readable codes used for this - purpose are XML elements classified as preconditions and - postconditions, so naturally any group defining a new error code can - use their own namespace. As always, the "DAV:" namespace is reserved - for use by IETF-chartered WebDAV working groups. + 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 + the numeric code. However, it does remove the need to define new + numeric codes. The new machine-readable codes used for this purpose + are XML elements classified as preconditions and postconditions, so + naturally any group defining a new condition code can use their own + namespace. As always, the "DAV:" namespace is reserved for use by + IETF-chartered WebDAV working groups. A server supporting this specification SHOULD use the XML error whenever a precondition or postcondition defined in this document is violated. For error conditions not specified in this document, the server MAY simply choose an appropriate numeric status and leave the response body blank. However, a server MAY instead use a custom - error code and other supporting text, because even when clients do - not automatically recognize error codes they can be quite useful in - interoperability testing and debugging. + condition code and other supporting text, because even when clients + do not automatically recognize condition codes they can be quite + useful in interoperability testing and debugging. - Example - Response with precondition code" + Example - Response with precondition code >>Response HTTP/1.1 423 Locked Content-Type: application/xml; charset="utf-8" Content-Length: xxxx /workspace/webdav/ In this example, a client unaware of a "Depth: infinity" lock on the parent collection "/workspace/webdav/" attempted to modify the collection member "/workspace/webdav/proposal.doc". Some other useful preconditions and postconditions have been defined in other specifications extending WebDAV, such as [RFC3744] (see - particularly section 7.1.1), [RFC3253], and [RFC3648]. + particularly Section 7.1.1), [RFC3253], and [RFC3648]. - All these elements are in the "DAV:" namespace. + All these elements are in the "DAV:" namespace. If not specified + otherwise, the content for each condition's XML element is defined to + be empty. Name: lock-token-matches-request-uri Use with: 409 Conflict Purpose: (precondition) -- A request may include a Lock-Token header - to identify a lock for the purposes of an operation such as - refresh LOCK or UNLOCK. However, if the Request-URI does not fall - within the scope of the lock identified by the token, the server - SHOULD use this error. The lock may have a scope that does not - include the Request-URI, or the lock could have disappeared, or - the token may be invalid. - - + to identify a lock for the UNLOCK method. However, if the + Request-URI does not fall within the scope of the lock identified + by the token, the server SHOULD use this error. The lock may have + a scope that does not include the Request-URI, or the lock could + have disappeared, or the token may be invalid. Name: lock-token-submitted (precondition) Use with: 423 Locked Purpose: The request could not succeed because a lock token should have been submitted. This element, if present, MUST contain at least one URL of a locked resource that prevented the request. In cases of MOVE, COPY and DELETE where collection locks are involved, it can be difficult for the client to find out which @@ -4642,50 +4630,43 @@ Name: no-external-entities Use with: 403 Forbidden Purpose: (precondition) -- If the server rejects a client request because the request body contains an external entity, the server SHOULD use this error. - - Name: preserved-live-properties Use with: 409 Conflict Purpose: (postcondition) -- The server received an otherwise-valid MOVE or COPY request, but cannot maintain the live properties with the same behavior at the destination. It may be that the server only supports some live properties in some parts of the repository, or simply has an internal error. - - Name: propfind-finite-depth Use with: 403 Forbidden + Purpose: (precondition) -- This server does not allow infinite-depth PROPFIND requests on collections. - - Name: cannot-modify-protected-property - Use with: 403 Forbidden - Purpose: (precondition) -- The client attempted to set a read-only - property in a PROPPATCH (such as DAV:getetag). - - + Purpose: (precondition) -- The client attempted to set a protected + property in a PROPPATCH (such as DAV:getetag). See also + [RFC3253], Section 3.12. 17. XML Extensibility in DAV The XML namespace extension ([REC-XML-NAMES]) is used in this specification in order to allow for new XML elements to be added without fear of colliding with other element names. Although WebDAV request and response bodies can be extended by arbitrary 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 response body unless that XML element is explicitly defined in an @@ -4715,69 +4696,67 @@ Processing instructions in XML SHOULD be ignored by recipients. Thus, specifications extending WebDAV SHOULD NOT use processing instructions to define normative behavior. XML DTD fragments are included for all the XML elements defined in this specification. However, correct XML will not be valid according to any DTD due to namespace usage and extension rules. In particular: - o All elements defined in this specification use the "DAV:" - namespace, + o Elements (from this specification) are in the "DAV:" namespace, o Element ordering is irrelevant unless otherwise stated, - o Extension attributes MAY be added, + o Extension attributes MAY be added, o For element type definitions of "ANY", the normative text definition for that element defines what can be in it and what that means. o For element type definitions of "#PCDATA", extension elements MUST NOT be added. o For other element type definitions, including "EMPTY", extension elements MAY be added. Note that this means that elements containing elements cannot be extended to contain text, and vice versa. With DTD validation relaxed by the rules above, the constraints described by the DTD fragments are normative (see for example - Appendix A A recipient of a WebDAV message with an XML body MUST NOT - validate the XML document according to any hard-coded or dynamically- - declared DTD. + Appendix A). A recipient of a WebDAV message with an XML body MUST + NOT validate the XML document according to any hard-coded or + dynamically-declared DTD. Note that this section describes backwards-compatible extensibility rules. There might also be times when an extension is designed not to be backwards-compatible, for example defining an extension that reuses an XML element defined in this document but omitting one of the child elements required by the DTDs in this specification. 18. DAV Compliance Classes A DAV compliant resource can advertise several classes of compliance. A client can discover the compliance classes of a resource by executing OPTIONS on the resource, and examining the "DAV" header which is returned. Note particularly that resources are spoken of as being compliant, rather than servers. That is because theoretically some resources on a server could support different feature sets. E.g. a server could have a sub-repository where an advanced feature - like server was supported, even if that feature was not supported on - all servers. + like versioning was supported, even if that feature was not supported + on all sub-repositories. Since this document describes extensions to the HTTP/1.1 protocol, minimally all DAV compliant resources, clients, and proxies MUST be compliant with [RFC2616]. - A resource that is class 2 compliant must also be class 1 compliant, - and a resource that is class 3 compliant must also be class 1 + A resource that is class 2 or class 3 compliant must also be class 1 compliant. 18.1. Class 1 A class 1 compliant resource MUST meet all "MUST" requirements in all sections of this document. Class 1 compliant resources MUST return, at minimum, the value "1" in the DAV header on all responses to the OPTIONS method. @@ -4965,85 +4944,85 @@ property data. To reduce the risk of inadvertent release of private information via properties, servers are encouraged to develop access control mechanisms that separate read access to the resource body and read access to the resource's properties. This allows a user to control the dissemination of their property data without overly restricting access to the resource's contents. 20.6. Implications of XML Entities 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 instruct an XML processor to retrieve and include additional XML. An external XML entity can be used to append or modify the document type declaration (DTD) 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- validating XML, such as the XML used in this specification, including an external XML entity is not required by XML. However, XML does state that an XML processor may, at its discretion, include the external XML entity. External XML entities have no inherent trustworthiness and are 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 DTD, and hence affect the final form of an XML document, in the worst case significantly modifying its semantics, or exposing the XML processor to the security risks discussed in [RFC3023]. Therefore, implementers must be aware that external XML entities should be treated as untrustworthy. If a server implementor chooses not to handle external XML entities, it SHOULD respond to requests - containing external entities with the precondition defined above (no- - external-entities). + containing external entities with the 'no-external-entities' + condition code. There is also the scalability risk that would accompany a widely deployed application which made use of external XML entities. In this situation, it is possible that there would be significant numbers of requests for one external XML entity, potentially overloading any server which fields requests for the resource containing the external XML entity. 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 enormous amounts of memory and/or processing time to process. Server implementors should be aware of this risk and configure their XML parsers so that requests like these can be detected and rejected as early as possible. 20.7. Risks Connected with Lock Tokens This specification encourages the use of "A Universally Unique Identifier (UUID) URN Namespace" ([RFC4122]) for lock tokens - Section 6.5, in order to guarantee their uniqueness across space and - time. Version 1 UUIDs (defined in section 4) MAY contain a "node" - field that "consists of an IEEE 802 MAC address, usually the host - address. For systems with multiple IEEE addresses, any available one - can be used". Since a WebDAV server will issue many locks over its - lifetime, the implication is that it may also be publicly exposing - its IEEE 802 address. + (Section 6.5), in order to guarantee their uniqueness across space + and time. Version 1 UUIDs (defined in Section 4) MAY contain a + "node" field that "consists of an IEEE 802 MAC address, usually the + host address. For systems with multiple IEEE addresses, any + available one can be used". Since a WebDAV server will issue many + locks over its lifetime, the implication is that it may also be + publicly exposing its IEEE 802 address. There are several risks associated with exposure of IEEE 802 addresses. Using the IEEE 802 address: o It is possible to track the movement of hardware from subnet to subnet. o It may be possible to identify the manufacturer of the hardware running a WebDAV server. o It may be possible to determine the number of each type of computer running WebDAV. This risk only applies to host address based UUID versions. Section 4 of [RFC4122] describes several other mechanisms for generating - UUIDs that do involve the host address and therefore do not suffer - from this risk. + UUIDs that do not involve the host address and therefore do not + suffer from this risk. 20.8. Hosting Malicious Content HTTP has the ability to host programs which are executed on client machines. These programs can take many forms including web scripts, executables, plug in modules, and macros in documents. WebDAV does not change any of the security concerns around these programs yet 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 trust relationship with the author that is publishing the document. @@ -5314,21 +5293,22 @@ Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005. [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally Unique IDentifier (UUID) URN Namespace", RFC 4122, July 2005. 25.2. Informational References [I-D.draft-whitehead-http-etag] - Whitehead, J., "ETags in HTTP PUT Responses", + Whitehead, J., "Design Considerations for State + Identifiers in HTTP and WebDAV", draft-whitehead-http-etag-00 (work in progress), February 2006. [RFC2291] Slein, J., Vitali, F., Whitehead, E., and D. Durand, "Requirements for a Distributed Authoring and Versioning Protocol for the World Wide Web", RFC 2291, February 1998. [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D. Jensen, "HTTP Extensions for Distributed Authoring -- WEBDAV", RFC 2518, February 1999. @@ -5502,27 +5482,70 @@ tokens and to be unique across all resources for all time. An opaquelocktoken URI is constructed by concatenating the 'opaquelocktoken' scheme with a UUID, along with an optional 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 the algorithm generating the extension MUST guarantee that the same extension will never be used twice with the associated UUID. OpaqueLockToken-URI = "opaquelocktoken:" UUID [Extension] - ; UUID is defined in section 3 of RFC4122. Note that linear white - ; space (LWS) is not allowed between elements of this production. + ; UUID is defined in Section 3 of [RFC4122]. Note that linear + ; white space (LWS) is not allowed between elements of + ; this production. Extension = path - ; path is defined in section 3.3 of RFC3986 + ; path is defined in Section 3.3 of [RFC3986] -Appendix D. Guidance for Clients Desiring to Authenticate +Appendix D. Lock-null Resources + + The original WebDAV model for locking unmapped URLs created "lock- + null resources". This model was over-complicated and some + interoperability and implementation problems were discovered. The + new WebDAV model for locking unmapped URLs (see Section 7.3) creates + "locked empty resources". Lock-null resources are deprecated. This + section discusses the original model briefly because clients MUST be + able to handle either model. + + In the original "lock-null resource" model, which is no longer + recommended for implementation: + + o A lock-null resource sometimes appeared as "Not Found". The + server responds with a 404 or 405 to any method except for PUT, + MKCOL, OPTIONS, PROPFIND, LOCK, UNLOCK. + + o A lock-null resource does however show up as a member of its + parent collection. + + o The server removes the lock-null resource entirely (its URI + becomes unmapped) if its lock goes away before it is converted to + a regular resource. Recall that locks go away not only when they + expire or are unlcoked, but are also removed if a resource is + renamed or moved, or if any parent collection is renamed or moved. + + o The server converts the lock-null resource into a regular resource + if a PUT request to the URL is successful. + + o The server converts the lock-null resource into a collection if a + MKCOL request to the URL is successful (though interoperability + experience showed that not all servers followed this requirement). + + o Property values were defined for DAV:lockdiscovery and DAV: + supportedlock properties but not necessarily for other properties + like DAV:getcontenttype. + + Clients can easily interoperate both with servers that support the + old model "lock-null resources" and the recommended model of "locked + empty resources" by only attempting PUT after a LOCK to an unmapped + URL, not MKCOL or GET. + +Appendix E. Guidance for Clients Desiring to Authenticate Many WebDAV clients already implemented have account settings (similar to the way email clients store IMAP account settings). Thus, the WebDAV client would be able to authenticate with its first couple requests to the server, provided it had a way to get the authentication challenge from the server with realm name, nonce and other challenge information. Note that the results of some requests might vary according to whether the client is authenticated or not -- a PROPFIND might return more visible resources if the client is authenticated, yet not fail if the client is anonymous. @@ -5583,29 +5606,29 @@ >>Request PROPFIND /docs/ HTTP/1.1 Host: www.example.com Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== Content-type: application/xml; charset="utf-8" Content-Length: xxxx [body omitted] -Appendix E. Summary of changes from RFC2518 +Appendix F. Summary of changes from RFC2518 This section lists major changes between this document and RFC2518, starting with those that are likely to result in implementation changes. Servers will advertise support for all changes in this specification by returning the compliance class "3" in the DAV response header (see Sections 10.1 and 18.3). -E.1. Changes for both Client and Server Implementations +F.1. Changes for both Client and Server Implementations Collections and Namespace Operations o The semantics of PROPFIND 'allprop' (Section 9.1) have been relaxed so that servers may leave out live properties defined in other specifications, such as [RFC3253] and [RFC3744]. Related to this, 'allprop' requests can now be extended with the 'include' syntax to include specific named properties, thereby avoiding additional requests due to changed 'allprop' semantics. @@ -5644,30 +5667,28 @@ o RFC2518's concept of "lock-null resources" (LNRs) has been replaced by a simplified approach, the "locked empty resources" (see Section 7.3). There are some aspects of lock-null resources clients can not rely on anymore, namely the ability to use them to create a locked collection or the fact that they disappear upon UNLOCK when no PUT or MKCOL request was issued. Note that servers are still allowed to implement LNRs as per RFC2518. o There is no implicit refresh of locks anymore. Locks are only - refreshed upon explicit request. Furthermore, the lock token for - the lock to be refreshed is now specified in the Lock-Token - request header rather than the If header (see Section 9.10.2). + refreshed upon explicit request (see Section 9.10.2). o Clarified that the DAV:owner value supplied in the LOCK request must be preserved by the server just like a dead property (Section 14.17). Also added the DAV:lockroot element (Section 14.12) which allows clients to discover the root of lock. -E.2. Changes for Server Implementations +F.2. Changes for Server Implementations Collections and Namespace Operations o Due to interoperability problems, allowable formats for contents of 'href' elements in multistatus responses have been limited (see Section 8.3). o Due to lack of implementation, support for the 'propertybehaviour' request body for COPY and MOVE has been removed. Instead, requirements for property preservation have been clarified (see @@ -5695,21 +5715,21 @@ o Strengthened requirement to check identity of lock creator when accessing locked resources (see Section 6.4). Clients should be aware that lock tokens returned to other principals can only be used to break a lock, if at all. o Section 8.10.4 of [RFC2518] incorrectly required servers to return a 409 status where a 207 status was really appropriate. This has been corrected (Section 9.10). -E.3. Other Changes +F.3. Other Changes The definition of collection state has been fixed so it doesn't vary anymore depending on the Request-URI (see Section 5.2). The DAV:source property introduced in Section 4.6 of [RFC2518] was removed due to lack of implementation experience. The DAV header now allows non-IETF extensions through URIs in addition to compliance class tokens. It also can now be used in requests, although this specification does not define any associated @@ -5722,23 +5742,23 @@ reversed (see Section 10.2). The definitions of HTTP status code 102 ([RFC2518], Section 10.1) and the Status-URI response header (Section 9.7) have been removed due to lack of implementation. The TimeType format used in the Timeout request header and the "timeout" XML element used to be extensible. Now, only the two formats defined by this specification are allowed (see Section 10.7). -Appendix F. Change Log (to be removed by RFC Editor before publication) +Appendix G. Change Log (to be removed by RFC Editor before publication) -F.1. Changes from -05 to -06 +G.1. Changes from -05 to -06 Specified that a successful LOCK request to an unmapped URL creates a new, empty locked resource. Resolved UNLOCK_NEEDS_IF_HEADER by clarifying that only Lock-Token header is needed on UNLOCK. Added Section 16 on preconditions and postconditions and defined a number of preconditions and postconditions. The 'lock-token- submitted' precondition resolves the REPORT_OTHER_RESOURCE_LOCKED @@ -5751,21 +5771,21 @@ keep consistent with other places where client provides URLs (If header, href element in request body) Clarified the href element - that it generally contains HTTP URIs but not always. Attempted to fix the BNF describing the If header to allow commas Clarified presence of Depth header on LOCK refresh requests. -F.2. Changes in -07 +G.2. Changes in -07 Added text to "COPY and the Overwrite Header" section to resolve issue OVERWRITE_DELETE_ALL_TOO_STRONG. Added text to "HTTP URL Namespace Model" section to provide more clarification and examples on what consistency means and what is not required, to resolve issue CONSISTENCY. Resolve DEFINE_PRINCIPAL by importing definition of principal from RFC3744. @@ -5799,33 +5819,33 @@ Added notes on use of 503 status response to resolve issue PROPFIND_INFINITY Removed section on other uses of Metadata (and associated references) Added reference to RFC4122 for lock tokens and removed section on generating UUIDs Explained that even with language variation, a property has only one - value (section 4.5). + value (Section 4.5). Added section on lock owner (7.1) and what to do if lock requested by unauthenticated user - Removed section 4.2 -- justification on why to have metadata, not + Removed Section 4.2 -- justification on why to have metadata, not needed now - Removed paragraph in section 5.2 about collections with resource type + Removed paragraph in Section 5.2 about collections with resource type "DAV:collection" but which are non-WebDAV compliant -- not implemented. -F.3. Changes in -08 +G.3. Changes in -08 Added security considerations section on scripts and cookie sessions, suggested by Barry Lind Clarified which error codes are defined and undefined in MultiStatus Moved opaquelocktoken definition to an appendix and refer to RFC4122 for use of 'urn:uuid:' URI scheme; fix all lock token examples to use this. @@ -5834,21 +5854,21 @@ limitations. (bug 12) Moved status code sections before example sections within PROPFIND section for section ordering consistency. Clarified use of Location header with Multi-Status Bugzilla issue resolutions: bugs 9, 12, 14, 19, 20, 29, 30, 34, 36, 102 and 172. -F.4. Changes in -09 +G.4. Changes in -09 Bugzilla editorial issues: bugs 30, 57, 63, 68, 88, 89, 168, 180, 182, 185, 187. More clarity between URL namespaces and XML namespaces, particularly at the beginning of paragraphs using the word namespace More consistency in referring to properties with the namespace, as in "DAV:lockdiscovery", and referring to XML element names in single quotes, e.g. 'allprop' element. @@ -5874,89 +5894,105 @@ Fix bug 46, 105, 107, 120, 140 and 201. Another stab at bug 12 - relative v. absolute URLs in Multi-Status response hrefs Fix bug 6, 11, 15, 16, 28, 32, 42, 51, 52, 53, 58, 60, 62, 186, 189, 191, 199, 200 Fix bug 96 -F.5. Changes in -10 +G.5. Changes in -10 Clarify lock intro text on when a client might use another client's lock token - suggestion by Geoff, Nov 15 Removed Force-Authenticate header and instead added an appendix explaining how existing mechanisms might resolve the need of clients to get an authentication challenge (bug 18). Bug 62, 113, 125, 131, 143, 144, 171, 193 Bug 176, 177, 179, 181, 184, 206, 207, 208 -F.6. Changes in -11 +G.6. Changes in -11 Bug 10, 50, 92, 213, 214, 215 not recommend use of 414 for over-long Destination URI, bug 179 Changes for bug 10, 31, 42, 44, 46, 47, 80, 86, 99, 124, 132, 143, 147, 152, 166, 177, 188, 216, 218 Various changes discussed in conference call, including bug 10, 42, 44, 80, 97, 152. Bugs 55, 85, 86 -F.7. Changes in -12 +G.7. Changes in -12 Incorporated GULP (Lock model) into document, making a fair number of changes to rationalize the new order of explaining things, keeping text that explains a lock model concept in more detail but removing text that is redundant or inconsistent. Various bugs including 46, 48, 53, 97, 152, 179, 184, 188, 200, 210, 211, and 225. Moved URL Handling from Multi-Status section to general request and response handling section as it now applies to Destination and If as well as 'href' in Multi-Status. Moved GR&RH section up one level to be the new Section 8. Bug 53, 184, 210, 213, 217, 221 Further rewriting of URL Handling section. Changes resulting from discussion of empty locked resources and how servers should handle Content-Type in that situation. Bug 48, 179. Bug 227, 228 -F.8. Changes in -13 +G.8. Changes in -13 Moved the timeout model text and clarified it (bug 229). Fixed the definition of collection state (bug 227). Made the depth header required on PROPFIND requests (bug 213). Fixed inconsistencies in Destination header definition (bug 211). Improved appendix on HTTP client compatibility (bug 100). Fixed external references with unwieldy pointers (bug 72). -F.9. Changes in -14 +G.9. Changes in -14 Changes section rewritten, if section rewritten Collection definition and membership requirements changed (bug 227) Bug 100 and 229 iterations, smallish editorial changes +G.10. Changes in -15 + + Moved lock-null resource explanation to an appendix. + + Reverted to RFC2518 behavior of refreshing lock with "If" header. + + Removed section on locks and multiple bindings. + + Removed requirement for clients to upate a property only once in a + PROPPATCH. + + Updated displayname property description. + + Copy-edit level changes e.g. "read-only" to "protected", and defining + what it means to protect a resource with a lock. + Author's Address Lisa Dusseault (editor) Open Source Application Foundation 2064 Edgewood Dr. Palo Alto, CA 94303 US Email: lisa@osafoundation.org