idnits 2.17.1 draft-ietf-webdav-bind-19.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 20. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 1826. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1837. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1844. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1850. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC4918, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust Copyright Line does not match the current year == Line 541 has weird spacing: '...| x.gif y.g...' == Line 563 has weird spacing: '...| x.gif y.g...' == Line 767 has weird spacing: '...| x.gif y.g...' (Using the creation date from RFC4918, updated by this document, for RFC5378 checks: 2002-02-20) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 3, 2007) is 6142 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) -- Possible downref: Non-RFC (?) normative reference: ref. 'XML' Summary: 2 errors (**), 0 flaws (~~), 4 warnings (==), 9 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group G. Clemm 3 Internet-Draft IBM 4 Updates: 4918 (if approved) J. Crawford 5 Intended status: Standards Track IBM Research 6 Expires: January 4, 2008 J. Reschke, Ed. 7 greenbytes 8 J. Whitehead 9 U.C. Santa Cruz 10 July 3, 2007 12 Binding Extensions to Web Distributed Authoring and Versioning (WebDAV) 13 draft-ietf-webdav-bind-19 15 Status of this Memo 17 By submitting this Internet-Draft, each author represents that any 18 applicable patent or other IPR claims of which he or she is aware 19 have been or will be disclosed, and any of which he or she becomes 20 aware will be disclosed, in accordance with Section 6 of BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that 24 other groups may also distribute working documents as Internet- 25 Drafts. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 The list of current Internet-Drafts can be accessed at 33 http://www.ietf.org/ietf/1id-abstracts.txt. 35 The list of Internet-Draft Shadow Directories can be accessed at 36 http://www.ietf.org/shadow.html. 38 This Internet-Draft will expire on January 4, 2008. 40 Copyright Notice 42 Copyright (C) The IETF Trust (2007). 44 Abstract 46 This specification defines bindings, and the BIND method for creating 47 multiple bindings to the same resource. Creating a new binding to a 48 resource causes at least one new URI to be mapped to that resource. 50 Servers are required to insure the integrity of any bindings that 51 they allow to be created. 53 Editorial Note (To be removed by RFC Editor before publication) 55 Please send comments to the Distributed Authoring and Versioning 56 (WebDAV) working group at , which may be 57 joined by sending a message with subject "subscribe" to 58 . Discussions of the WEBDAV 59 working group are archived at 60 . 62 lists 63 all registered issues since draft 02. 65 Table of Contents 67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 68 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 69 1.2. Method Preconditions and Postconditions . . . . . . . . . 7 70 2. Overview of Bindings . . . . . . . . . . . . . . . . . . . . . 7 71 2.1. Bindings to Collections . . . . . . . . . . . . . . . . . 8 72 2.1.1. Bind loops . . . . . . . . . . . . . . . . . . . . . . 9 73 2.2. URI Mappings Created by a new Binding . . . . . . . . . . 9 74 2.3. COPY and Bindings . . . . . . . . . . . . . . . . . . . . 10 75 2.3.1. Example: COPY with 'Depth: infinity' in presence 76 of bind loops . . . . . . . . . . . . . . . . . . . . 12 77 2.3.2. Example: COPY with 'Depth: infinity' with multiple 78 bindings to a leaf resource . . . . . . . . . . . . . 14 79 2.4. DELETE and Bindings . . . . . . . . . . . . . . . . . . . 15 80 2.5. MOVE and Bindings . . . . . . . . . . . . . . . . . . . . 15 81 2.6. PROPFIND and Bindings . . . . . . . . . . . . . . . . . . 16 82 2.7. Determining Whether Two Bindings Are to the Same 83 Resource . . . . . . . . . . . . . . . . . . . . . . . . . 16 84 2.8. Discovering the Bindings to a Resource . . . . . . . . . . 17 85 3. Properties . . . . . . . . . . . . . . . . . . . . . . . . . . 17 86 3.1. DAV:resource-id Property . . . . . . . . . . . . . . . . . 18 87 3.2. DAV:parent-set Property . . . . . . . . . . . . . . . . . 18 88 3.2.1. Example for DAV:parent-set property . . . . . . . . . 18 89 4. BIND Method . . . . . . . . . . . . . . . . . . . . . . . . . 19 90 4.1. Example: BIND . . . . . . . . . . . . . . . . . . . . . . 22 91 5. UNBIND Method . . . . . . . . . . . . . . . . . . . . . . . . 22 92 5.1. Example: UNBIND . . . . . . . . . . . . . . . . . . . . . 24 93 6. REBIND Method . . . . . . . . . . . . . . . . . . . . . . . . 24 94 6.1. Example: REBIND . . . . . . . . . . . . . . . . . . . . . 26 95 6.2. Example: REBIND in presence of locks and bind loops . . . 27 96 7. Additional Status Codes . . . . . . . . . . . . . . . . . . . 29 97 7.1. 208 Already Reported . . . . . . . . . . . . . . . . . . . 29 98 7.1.1. Example: PROPFIND by bind-aware client . . . . . . . . 30 99 7.1.2. Example: PROPFIND by non-bind-aware client . . . . . . 32 100 7.2. 506 Loop Detected . . . . . . . . . . . . . . . . . . . . 32 101 8. Capability discovery . . . . . . . . . . . . . . . . . . . . . 32 102 8.1. OPTIONS method . . . . . . . . . . . . . . . . . . . . . . 32 103 8.2. 'DAV' request header . . . . . . . . . . . . . . . . . . . 32 104 9. Relationship to WebDAV Access Control Protocol . . . . . . . . 33 105 10. Security Considerations . . . . . . . . . . . . . . . . . . . 33 106 10.1. Privacy Concerns . . . . . . . . . . . . . . . . . . . . . 33 107 10.2. Bind Loops . . . . . . . . . . . . . . . . . . . . . . . . 33 108 10.3. Bindings, and Denial of Service . . . . . . . . . . . . . 33 109 10.4. Private Locations May Be Revealed . . . . . . . . . . . . 34 110 10.5. DAV:parent-set and Denial of Service . . . . . . . . . . . 34 111 11. Internationalization Considerations . . . . . . . . . . . . . 34 112 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 113 13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 34 114 14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 35 115 14.1. Normative References . . . . . . . . . . . . . . . . . . . 35 116 14.2. Informative References . . . . . . . . . . . . . . . . . . 35 117 Appendix A. Clarification to RFC2518bis' Usage of the term 118 'lock root' . . . . . . . . . . . . . . . . . . . . . 35 119 Appendix B. Change Log (to be removed by RFC Editor before 120 publication) . . . . . . . . . . . . . . . . . . . . 36 121 B.1. Since draft-ietf-webdav-bind-02 . . . . . . . . . . . . . 36 122 B.2. Since draft-ietf-webdav-bind-03 . . . . . . . . . . . . . 36 123 B.3. Since draft-ietf-webdav-bind-04 . . . . . . . . . . . . . 36 124 B.4. Since draft-ietf-webdav-bind-05 . . . . . . . . . . . . . 37 125 B.5. Since draft-ietf-webdav-bind-06 . . . . . . . . . . . . . 37 126 B.6. Since draft-ietf-webdav-bind-07 . . . . . . . . . . . . . 37 127 B.7. Since draft-ietf-webdav-bind-08 . . . . . . . . . . . . . 37 128 B.8. Since draft-ietf-webdav-bind-09 . . . . . . . . . . . . . 37 129 B.9. Since draft-ietf-webdav-bind-10 . . . . . . . . . . . . . 37 130 B.10. Since draft-ietf-webdav-bind-11 . . . . . . . . . . . . . 38 131 B.11. Since draft-ietf-webdav-bind-12 . . . . . . . . . . . . . 38 132 B.12. Since draft-ietf-webdav-bind-13 . . . . . . . . . . . . . 38 133 B.13. Since draft-ietf-webdav-bind-14 . . . . . . . . . . . . . 38 134 B.14. Since draft-ietf-webdav-bind-15 . . . . . . . . . . . . . 39 135 B.15. Since draft-ietf-webdav-bind-16 . . . . . . . . . . . . . 39 136 B.16. Since draft-ietf-webdav-bind-17 . . . . . . . . . . . . . 39 137 B.17. Since draft-ietf-webdav-bind-18 . . . . . . . . . . . . . 39 138 Appendix C. Resolved issues (to be removed by RFC Editor 139 before publication) . . . . . . . . . . . . . . . . . 39 140 C.1. rfc4918 . . . . . . . . . . . . . . . . . . . . . . . . . 39 141 Appendix D. Open issues (to be removed by RFC Editor prior to 142 publication) . . . . . . . . . . . . . . . . . . . . 39 143 D.1. edit . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 144 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 145 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 42 146 Intellectual Property and Copyright Statements . . . . . . . . . . 43 148 1. Introduction 150 This specification extends the WebDAV Distributed Authoring Protocol 151 ([RFC4918]) to enable clients to create new access paths to existing 152 resources. This capability is useful for several reasons: 154 URIs of WebDAV-compliant resources are hierarchical and correspond to 155 a hierarchy of collections in resource space. The WebDAV Distributed 156 Authoring Protocol makes it possible to organize these resources into 157 hierarchies, placing them into groupings, known as collections, which 158 are more easily browsed and manipulated than a single flat 159 collection. However, hierarchies require categorization decisions 160 that locate resources at a single location in the hierarchy, a 161 drawback when a resource has multiple valid categories. For example, 162 in a hierarchy of vehicle descriptions containing collections for 163 cars and boats, a description of a combination car/boat vehicle could 164 belong in either collection. Ideally, the description should be 165 accessible from both. Allowing clients to create new URIs that 166 access the existing resource lets them put that resource into 167 multiple collections. 169 Hierarchies also make resource sharing more difficult, since 170 resources that have utility across many collections are still forced 171 into a single collection. For example, the mathematics department at 172 one university might create a collection of information on fractals 173 that contains bindings to some local resources, but also provides 174 access to some resources at other universities. For many reasons, it 175 may be undesirable to make physical copies of the shared resources on 176 the local server: to conserve disk space, to respect copyright 177 constraints, or to make any changes in the shared resources visible 178 automatically. Being able to create new access paths to existing 179 resources in other collections or even on other servers is useful for 180 this sort of case. 182 The BIND method defined here provides a mechanism for allowing 183 clients to create alternative access paths to existing WebDAV 184 resources. HTTP [RFC2616] and WebDAV [RFC4918] methods are able to 185 work because there are mappings between URIs and resources. A method 186 is addressed to a URI, and the server follows the mapping from that 187 URI to a resource, applying the method to that resource. Multiple 188 URIs may be mapped to the same resource, but until now there has been 189 no way for clients to create additional URIs mapped to existing 190 resources. 192 BIND lets clients associate a new URI with an existing WebDAV 193 resource, and this URI can then be used to submit requests to the 194 resource. Since URIs of WebDAV resources are hierarchical, and 195 correspond to a hierarchy of collections in resource space, the BIND 196 method also has the effect of adding the resource to a collection. 197 As new URIs are associated with the resource, it appears in 198 additional collections. 200 A BIND request does not create a new resource, but simply makes 201 available a new URI for submitting requests to an existing resource. 202 The new URI is indistinguishable from any other URI when submitting a 203 request to a resource. Only one round trip is needed to submit a 204 request to the intended target. Servers are required to enforce the 205 integrity of the relationships between the new URIs and the resources 206 associated with them. Consequently, it may be very costly for 207 servers to support BIND requests that cross server boundaries. 209 This specification is organized as follows. Section 1.1 defines 210 terminology used in the rest of the specification, while Section 2 211 overviews bindings. Section 3 defines the new properties needed to 212 support multiple bindings to the same resource. Section 4 specifies 213 the BIND method, used to create multiple bindings to the same 214 resource. Section 5 specifies the UNBIND method, used to remove a 215 binding to a resource. Section 6 specifies the REBIND method, used 216 to move a binding to another collection. 218 1.1. Terminology 220 The terminology used here follows and extends that in the WebDAV 221 Distributed Authoring Protocol specification [RFC4918]. 223 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 224 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 225 document are to be interpreted as described in [RFC2119]. 227 This document uses XML DTD fragments ([XML]) as a notational 228 convention, using the rules defined in Section 17 of [RFC4918]. 230 URI Mapping 232 A relation between an absolute URI and a resource. For an 233 absolute URI U and the resource it identifies R, the URI mapping 234 can be thought of as (U => R). Since a resource can represent 235 items that are not network retrievable, as well as those that are, 236 it is possible for a resource to have zero, one, or many URI 237 mappings. Mapping a resource to an "http" scheme URI makes it 238 possible to submit HTTP protocol requests to the resource using 239 the URI. 241 Path Segment 242 Informally, the characters found between slashes ("/") in a URI. 243 Formally, as defined in Section 3.3 of [RFC3986]. 245 Binding 247 A relation between a single path segment (in a collection) and a 248 resource. A binding is part of the state of a collection. If two 249 different collections contain a binding between the same path 250 segment and the same resource, these are two distinct bindings. 251 So for a collection C, a path segment S, and a resource R, the 252 binding can be thought of as C:(S -> R). Bindings create URI 253 mappings, and hence allow requests to be sent to a single resource 254 from multiple locations in a URI namespace. For example, given a 255 collection C (accessible through the URI 256 http://www.example.com/CollX), a path segment S (equal to 257 "foo.html"), and a resource R, then creating the binding C: (S -> 258 R) makes it possible to use the URI 259 http://www.example.com/CollX/foo.html to access R. 261 Collection 263 A resource that contains, as part of its state, a set of bindings 264 that identify internal member resources. 266 Internal Member URI 268 The URI that identifies an internal member of a collection, and 269 that consists of the URI for the collection, followed by a slash 270 character ('/'), followed by the path segment of the binding for 271 that internal member. 273 1.2. Method Preconditions and Postconditions 275 See Section 16 of [RFC4918] for the definitions of "precondition" and 276 "postcondition". 278 2. Overview of Bindings 280 Bindings are part of the state of a collection. They define the 281 internal members of the collection, and the names of those internal 282 members. 284 Bindings are added and removed by a variety of existing HTTP methods. 285 A method that creates a new resource, such as PUT, COPY, and MKCOL, 286 adds a binding. A method that deletes a resource, such as DELETE, 287 removes a binding. A method that moves a resource (e.g. MOVE) both 288 adds a binding (in the destination collection) and removes a binding 289 (in the source collection). The BIND method introduced here provides 290 a mechanism for adding a second binding to an existing resource. 291 There is no difference between an initial binding added by PUT, COPY, 292 or MKCOL, and additional bindings added with BIND. 294 It would be very undesirable if one binding could be destroyed as a 295 side effect of operating on the resource through a different binding. 296 In particular, the removal of one binding to a resource (e.g. with a 297 DELETE or a MOVE) MUST NOT disrupt another binding to that resource, 298 e.g. by turning that binding into a dangling path segment. The 299 server MUST NOT reclaim system resources after removing one binding, 300 while other bindings to the resource remain. In other words, the 301 server MUST maintain the integrity of a binding. It is permissible, 302 however, for future method definitions (e.g., a DESTROY method) to 303 have semantics that explicitly remove all bindings and/or immediately 304 reclaim system resources. 306 2.1. Bindings to Collections 308 Creating a new binding to a collection makes each resource associated 309 with a binding in that collection accessible via a new URI, and thus 310 creates new URI mappings to those resources but no new bindings. 312 For example, suppose a new binding CollY is created for collection C1 313 in the figure below. It immediately becomes possible to access 314 resource R1 using the URI /CollY/x.gif and to access resource R2 315 using the URI /CollY/y.jpg, but no new bindings for these child 316 resources were created. This is because bindings are part of the 317 state of a collection, and associate a URI that is relative to that 318 collection with its target resource. No change to the bindings in 319 Collection C1 is needed to make its children accessible using /CollY/ 320 x.gif and /CollY/y.jpg. 322 +-------------------------+ 323 | Root Collection | 324 | bindings: | 325 | CollX CollY | 326 +-------------------------+ 327 | / 328 | / 329 | / 330 +------------------+ 331 | Collection C1 | 332 | bindings: | 333 | x.gif y.jpg | 334 +------------------+ 335 | \ 336 | \ 337 | \ 338 +-------------+ +-------------+ 339 | Resource R1 | | Resource R2 | 340 +-------------+ +-------------+ 342 2.1.1. Bind loops 344 Bindings to collections can result in loops, which servers MUST 345 detect when processing "Depth: infinity" requests. It is sometimes 346 possible to complete an operation in spite of the presence of a loop. 347 For instance, a PROPFIND can still succeed if the server uses the new 348 status code 208 (Already Reported) defined in Section 7.1. 350 However, the 506 (Loop Detected) status code is defined in 351 Section 7.2 for use in contexts where an operation is terminated 352 because a loop was encountered. 354 2.2. URI Mappings Created by a new Binding 356 Suppose a binding from "Binding-Name" to resource R is to be added to 357 a collection, C. Then if C-MAP is the set of URIs that were mapped to 358 C before the BIND request, then for each URI "C-URI" in C-MAP, the 359 URI "C-URI/Binding-Name" is mapped to resource R following the BIND 360 request. 362 For example, if a binding from "foo.html" to R is added to a 363 collection C, and if the following URIs are mapped to C: 365 http://www.example.com/A/1/ 366 http://example.com/A/one/ 367 then the following new mappings to R are introduced: 369 http://www.example.com/A/1/foo.html 370 http://example.com/A/one/foo.html 372 Note that if R is a collection, additional URI mappings are created 373 to the descendents of R. Also, note that if a binding is made in 374 collection C to C itself (or to a parent of C), an infinite number of 375 mappings are introduced. 377 For example, if a binding from "myself" to C is then added to C, the 378 following infinite number of additional mappings to C are introduced: 380 http://www.example.com/A/1/myself 381 http://www.example.com/A/1/myself/myself 382 ... 384 and the following infinite number of additional mappings to R are 385 introduced: 387 http://www.example.com/A/1/myself/foo.html 388 http://www.example.com/A/1/myself/myself/foo.html 389 ... 391 2.3. COPY and Bindings 393 As defined in Section 9.8 of [RFC4918], COPY causes the resource 394 identified by the Request-URI to be duplicated, and makes the new 395 resource accessible using the URI specified in the Destination 396 header. Upon successful completion of a COPY, a new binding is 397 created between the last path segment of the Destination header, and 398 the destination resource. The new binding is added to its parent 399 collection, identified by the Destination header minus its final 400 segment. 402 The following figure shows an example: Suppose that a COPY is issued 403 to URI-3 for resource R (which is also mapped to URI-1 and URI-2), 404 with the Destination header set to URI-X. After successful 405 completion of the COPY operation, resource R is duplicated to create 406 resource R', and a new binding has been created which creates at 407 least the URI mapping between URI-X and the new resource (although 408 other URI mappings may also have been created). 410 URI-1 URI-2 URI-3 URI-X 411 | | | | 412 | | | <---- URI Mappings ----> | 413 | | | | 414 +---------------------+ +------------------------+ 415 | Resource R | | Resource R' | 416 +---------------------+ +------------------------+ 418 It might be thought that a COPY request with "Depth: 0" on a 419 collection would duplicate its bindings, since bindings are part of 420 the collection's state. This is not the case, however. The 421 definition of Depth in [RFC4918] makes it clear that a "Depth: 0" 422 request does not apply to a collection's members. Consequently, a 423 COPY with "Depth: 0" does not duplicate the bindings contained by the 424 collection. 426 If a COPY request causes an existing resource to be updated, the 427 bindings to that resource MUST be unaffected by the COPY request. 428 Using the preceding example, suppose that a COPY request is issued to 429 URI-X for resource R', with the Destination header set to URI-2. The 430 content and dead properties of resource R would be updated to be a 431 copy of those of resource R', but the mappings from URI-1, URI-2, and 432 URI-3 to resource R remain unaffected. If because of multiple 433 bindings to a resource, more than one source resource updates a 434 single destination resource, the order of the updates is server 435 defined. 437 If a COPY request would cause a new resource to be created as a copy 438 of an existing resource, and that COPY request has already created a 439 copy of that existing resource, the COPY request instead creates 440 another binding to the previous copy, instead of creating a new 441 resource. 443 2.3.1. Example: COPY with 'Depth: infinity' in presence of bind loops 445 As an example of how COPY with Depth infinity would work in the 446 presence of bindings, consider the following collection: 448 +------------------+ 449 | Root Collection | 450 | bindings: | 451 | CollX | 452 +------------------+ 453 | 454 | 455 +-------------------------------+ 456 | Collection C1 |<-------+ 457 | bindings: | | 458 | x.gif CollY | | 459 +-------------------------------+ | 460 | \ (creates loop) | 461 | \ | 462 +-------------+ +------------------+ | 463 | Resource R1 | | Collection C2 | | 464 +-------------+ | bindings: | | 465 | y.gif CollZ | | 466 +------------------+ | 467 | | | 468 | +--------+ 469 | 470 +-------------+ 471 | Resource R2 | 472 +-------------+ 474 If a COPY with Depth infinity is submitted to /CollX, with 475 destination of /CollA, the outcome of the copy operation is: 477 +------------------+ 478 | Root Collection | 479 | bindings: | 480 | CollX CollA | 481 +------------------+ 482 | | 483 | +---------------------------+ 484 | | 485 +-------------------+ | 486 | Collection C1 |<------------------+ | 487 | bindings: | | | 488 | x.gif CollY | | | 489 +-------------------+ | | 490 | \ (creates loop) | | 491 | \ | | 492 +-------------+ +-----------------+ | | 493 | Resource R1 | | Collection C2 | | | 494 +-------------+ | bindings: | | | 495 | y.gif CollZ | | | 496 +-----------------+ | | 497 | | | | 498 | +-------+ | 499 | | 500 +-------------+ | 501 | Resource R2 | | 502 +-------------+ | 503 | 504 +-------------------------------+ 505 | 506 +-------------------+ 507 | Collection C3 |<------------------+ 508 | bindings: | | 509 | x.gif CollY | | 510 +-------------------+ | 511 | \ (creates loop) | 512 | \ | 513 +-------------+ +-----------------+ | 514 | Resource R3 | | Collection C4 | | 515 +-------------+ | bindings: | | 516 | y.gif CollZ | | 517 +-----------------+ | 518 | | | 519 | +-------+ 520 | 521 +-------------+ 522 | Resource R4 | 523 +-------------+ 525 2.3.2. Example: COPY with 'Depth: infinity' with multiple bindings to a 526 leaf resource 528 Given the following collection hierarchy: 530 +------------------+ 531 | Root Collection | 532 | bindings: | 533 | CollX | 534 +------------------+ 535 | 536 | 537 | 538 +----------------+ 539 | Collection C1 | 540 | bindings: | 541 | x.gif y.gif | 542 +----------------+ 543 | | 544 | | 545 +-------------+ 546 | Resource R1 | 547 +-------------+ 549 A COPY of /CollX with Depth infinity to /CollY results in the 550 following collection hierarchy: 552 +------------------+ 553 | Root Collection | 554 | bindings: | 555 | CollX CollY | 556 +------------------+ 557 | \ 558 | \ 559 | \ 560 +----------------+ +-----------------+ 561 | Collection C1 | | Collection C2 | 562 | bindings: | | bindings: | 563 | x.gif y.gif | | x.gif y.gif | 564 +----------------+ +-----------------+ 565 | | | | 566 | | | | 567 +-------------+ +-------------+ 568 | Resource R1 | | Resource R2 | 569 +-------------+ +-------------+ 571 2.4. DELETE and Bindings 573 When there are multiple bindings to a resource, a DELETE applied to 574 that resource MUST NOT remove any bindings to that resource other 575 than the one identified by the Request-URI. For example, suppose the 576 collection identified by the URI "/a" has a binding named "x" to a 577 resource R, and another collection identified by "/b" has a binding 578 named "y" to the same resource R. Then a DELETE applied to "/a/x" 579 removes the binding named "x" from "/a" but MUST NOT remove the 580 binding named "y" from "/b" (i.e. after the DELETE, "/y/b" continues 581 to identify the resource R). 583 When DELETE is applied to a collection, it MUST NOT modify the 584 membership of any other collection that is not itself a member of the 585 collection being deleted. For example, if both "/a/.../x" and 586 "/b/.../y" identify the same collection, C, then applying DELETE to 587 "/a" must not delete an internal member from C or from any other 588 collection that is a member of C, because that would modify the 589 membership of "/b". 591 If a collection supports the UNBIND method (see Section 5), a DELETE 592 of an internal member of a collection MAY be implemented as an UNBIND 593 request. In this case, applying DELETE to a Request-URI has the 594 effect of removing the binding identified by the final segment of the 595 Request-URI from the collection identified by the Request-URI minus 596 its final segment. Although [RFC4918] allows a DELETE to be a non- 597 atomic operation, when the DELETE operation is implemented as an 598 UNBIND, the operation is atomic. In particular, a DELETE on a 599 hierarchy of resources is simply the removal of a binding to the 600 collection identified by the Request-URI. 602 2.5. MOVE and Bindings 604 When MOVE is applied to a resource, the other bindings to that 605 resource MUST be unaffected, and if the resource being moved is a 606 collection, the bindings to any members of that collection MUST be 607 unaffected. Also, if MOVE is used with Overwrite:T to delete an 608 existing resource, the constraints specified for DELETE apply. 610 If the destination collection of a MOVE request supports the REBIND 611 method (see Section 6), a MOVE of a resource into that collection MAY 612 be implemented as a REBIND request. Although [RFC4918] allows a MOVE 613 to be a non-atomic operation, when the MOVE operation is implemented 614 as a REBIND, the operation is atomic. In particular, applying a MOVE 615 to a Request-URI and a Destination URI has the effect of removing a 616 binding to a resource (at the Request-URI), and creating a new 617 binding to that resource (at the Destination URI). Even when the 618 Request-URI identifies a collection, the MOVE operation involves only 619 removing one binding to that collection and adding another. 621 As an example, suppose that a MOVE is issued to URI-3 for resource R 622 below (which is also mapped to URI-1 and URI-2), with the Destination 623 header set to URI-X. After successful completion of the MOVE 624 operation, a new binding has been created which creates the URI 625 mapping between URI-X and resource R. The binding corresponding to 626 the final segment of URI-3 has been removed, which also causes the 627 URI mapping between URI-3 and R to be removed. If resource R were a 628 collection, old URI-3 based mappings to members of R would have been 629 removed, and new URI-X based mappings to members of R would have been 630 created. 632 >> Before Request: 634 URI-1 URI-2 URI-3 635 | | | 636 | | | <---- URI Mappings 637 | | | 638 +---------------------+ 639 | Resource R | 640 +---------------------+ 642 >> After Request: 644 URI-1 URI-2 URI-X 645 | | | 646 | | | <---- URI Mappings 647 | | | 648 +---------------------+ 649 | Resource R | 650 +---------------------+ 652 2.6. PROPFIND and Bindings 654 Consistent with [RFC4918], the value of a dead property MUST be 655 independent of the number of bindings to its host resource or of the 656 path submitted to PROPFIND. On the other hand, the behaviour for 657 each live property depends on its individual definition (for example, 658 see [RFC3744], Section 5, paragraph 2). 660 2.7. Determining Whether Two Bindings Are to the Same Resource 662 It is useful to have some way of determining whether two bindings are 663 to the same resource. Two resources might have identical contents 664 and properties, but not be the same resource (e.g. an update to one 665 resource does not affect the other resource). 667 The REQUIRED DAV:resource-id property defined in Section 3.1 is a 668 resource identifier, which MUST be unique across all resources for 669 all time. If the values of DAV:resource-id returned by PROPFIND 670 requests through two bindings are identical character by character, 671 the client can be assured that the two bindings are to the same 672 resource. 674 The DAV:resource-id property is created, and its value assigned, when 675 the resource is created. The value of DAV:resource-id MUST NOT be 676 changed. Even after the resource is no longer accessible through any 677 URI, that value MUST NOT be reassigned to another resource's DAV: 678 resource-id property. 680 Any method that creates a new resource MUST assign a new, unique 681 value to its DAV:resource-id property. For example, a PUT applied to 682 a null resource, COPY (when not overwriting an existing target) and 683 CHECKIN (see [RFC3253], Section 4.4) must assign a new, unique value 684 to the DAV:resource-id property of the new resource they create. 686 On the other hand, any method that affects an existing resource must 687 not change the value of its DAV:resource-id property. Specifically, 688 a PUT or a COPY that updates an existing resource must not change the 689 value of its DAV:resource-id property. A REBIND, since it does not 690 create a new resource, but only changes the location of an existing 691 resource, must not change the value of the DAV:resource-id property. 693 2.8. Discovering the Bindings to a Resource 695 An OPTIONAL DAV:parent-set property on a resource provides a list of 696 the bindings that associate a collection and a URI segment with that 697 resource. If the DAV:parent-set property exists on a given resource, 698 it MUST contain a complete list of all bindings to that resource that 699 the client is authorized to see. When deciding whether to support 700 the DAV:parent-set property, server implementers / administrators 701 should balance the benefits it provides against the cost of 702 maintaining the property and the security risks enumerated in 703 Sections 10.4 and 10.5. 705 3. Properties 707 The bind feature introduces the properties defined below. 709 A DAV:allprop PROPFIND request SHOULD NOT return any of the 710 properties defined by this document. This allows a binding server to 711 perform efficiently when a naive client, which does not understand 712 the cost of asking a server to compute all possible live properties, 713 issues a DAV:allprop PROPFIND request. 715 3.1. DAV:resource-id Property 717 The DAV:resource-id property is a REQUIRED property that enables 718 clients to determine whether two bindings are to the same resource. 719 The value of DAV:resource-id is a URI, and may use any registered URI 720 scheme that guarantees the uniqueness of the value across all 721 resources for all time (e.g. the urn:uuid: URN namespace defined in 722 [RFC4122] or the opaquelocktoken: URI scheme defined in [RFC4918]). 724 726 3.2. DAV:parent-set Property 728 The DAV:parent-set property is an OPTIONAL property that enables 729 clients to discover what collections contain a binding to this 730 resource (i.e. what collections have that resource as an internal 731 member). It contains an of href/segment pair for each collection 732 that has a binding to the resource. The href identifies the 733 collection, and the segment identifies the binding name of that 734 resource in that collection. 736 A given collection MUST appear only once in the DAV:parent-set for 737 any given binding, even if there are multiple URI mappings to that 738 collection. 740 741 742 743 746 3.2.1. Example for DAV:parent-set property 748 For example, if collection C1 is mapped to both /CollX and /CollY, 749 and C1 contains a binding named "x.gif" to a resource R1, then either 750 [/CollX, x.gif] or [/CollY, x.gif] can appear in the DAV:parent-set 751 of R1, but not both. But if C1 also had a binding named "y.gif" to 752 R1, then there would be two entries for C1 in the DAV:binding-set of 753 R1 (i.e. both [/CollX, x.gif] and [/CollX, y.gif] or, alternatively, 754 both [/CollY, x.gif] and [/CollY, y.gif]). 756 +-------------------------+ 757 | Root Collection | 758 | bindings: | 759 | CollX CollY | 760 +-------------------------+ 761 | / 762 | / 763 | / 764 +-----------------+ 765 | Collection C1 | 766 | bindings: | 767 | x.gif y.gif | 768 +-----------------+ 769 | | 770 | | 771 | | 772 +--------------+ 773 | Resource R1 | 774 +--------------+ 776 In this case, one possible value for DAV:parent-set property on 777 "/CollX/x.gif" would be: 779 780 781 /CollX 782 x.gif 783 784 785 /CollX 786 y.gif 787 788 790 4. BIND Method 792 The BIND method modifies the collection identified by the Request- 793 URI, by adding a new binding from the segment specified in the BIND 794 body to the resource identified in the BIND body. 796 If a server cannot guarantee the integrity of the binding, the BIND 797 request MUST fail. Note that it is especially difficult to maintain 798 the integrity of cross-server bindings. Unless the server where the 799 resource resides knows about all bindings on all servers to that 800 resource, it may unwittingly destroy the resource or make it 801 inaccessible without notifying another server that manages a binding 802 to the resource. For example, if server A permits creation of a 803 binding to a resource on server B, server A must notify server B 804 about its binding and must have an agreement with B that B will not 805 destroy the resource while A's binding exists. Otherwise server B 806 may receive a DELETE request that it thinks removes the last binding 807 to the resource and destroy the resource while A's binding still 808 exists. The precondition DAV:cross-server-binding is defined below 809 for cases where servers fail cross-server BIND requests because they 810 cannot guarantee the integrity of cross-server bindings. 812 By default, if there already is a binding for the specified segment 813 in the collection, the new binding replaces the existing binding. 814 This default binding replacement behavior can be overridden using the 815 Overwrite header defined in Section 10.6 of [RFC4918]. 817 If a BIND request fails, the server state preceding the request MUST 818 be restored. This method is unsafe and idempotent (see [RFC2616], 819 Section 9.1). 821 Marshalling: 823 The request MAY include an Overwrite header. 825 The request body MUST be a DAV:bind XML element. 827 829 If the request succeeds, the server MUST return 201 (Created) when 830 a new binding was created and 200 (OK) when an existing binding 831 was replaced. 833 If a response body for a successful request is included, it MUST 834 be a DAV:bind-response XML element. Note that this document does 835 not define any elements for the BIND response body, but the DAV: 836 bind-response element is defined to ensure interoperability 837 between future extensions that do define elements for the BIND 838 response body. 840 842 Preconditions: 844 (DAV:bind-into-collection): The Request-URI MUST identify a 845 collection. 847 (DAV:bind-source-exists): The DAV:href element MUST identify a 848 resource. 850 (DAV:binding-allowed): The resource identified by the DAV:href 851 supports multiple bindings to it. 853 (DAV:cross-server-binding): If the resource identified by the DAV: 854 href element in the request body is on another server from the 855 collection identified by the Request-URI, the server MUST support 856 cross-server bindings. 858 (DAV:name-allowed): The name specified by the DAV:segment is 859 available for use as a new binding name. 861 (DAV:can-overwrite): If the collection already contains a binding 862 with the specified path segment, and if an Overwrite header is 863 included, the value of the Overwrite header MUST be "T". 865 (DAV:cycle-allowed): If the DAV:href element identifies a 866 collection, and if the Request-URI identifies a collection that is 867 a member of that collection, the server MUST support cycles in the 868 URI namespace. 870 (DAV:locked-update-allowed): If the collection identified by the 871 Request-URI is write-locked, then the appropriate token MUST be 872 specified in an If request header. 874 (DAV:locked-overwrite-allowed): If the collection already contains 875 a binding with the specified path segment, and if that binding is 876 protected by a write-lock, then the appropriate token MUST be 877 specified in an If request header. 879 Postconditions: 881 (DAV:new-binding): The collection MUST have a binding that maps 882 the segment specified in the DAV:segment element in the request 883 body, to the resource identified by the DAV:href element in the 884 request body. 886 4.1. Example: BIND 888 >> Request: 890 BIND /CollY HTTP/1.1 891 Host: www.example.com 892 Content-Type: application/xml; charset="utf-8" 893 Content-Length: xxx 895 896 897 bar.html 898 http://www.example.com/CollX/foo.html 899 901 >> Response: 903 HTTP/1.1 201 Created 905 The server added a new binding to the collection, 906 "http://www.example.com/CollY", associating "bar.html" with the 907 resource identified by the URI 908 "http://www.example.com/CollX/foo.html". Clients can now use the URI 909 "http://www.example.com/CollY/bar.html" to submit requests to that 910 resource. 912 5. UNBIND Method 914 The UNBIND method modifies the collection identified by the Request- 915 URI, by removing the binding identified by the segment specified in 916 the UNBIND body. 918 Once a resource is unreachable by any URI mapping, the server MAY 919 reclaim system resources associated with that resource. If UNBIND 920 removes a binding to a resource, but there remain URI mappings to 921 that resource, the server MUST NOT reclaim system resources 922 associated with the resource. 924 If an UNBIND request fails, the server state preceding the request 925 MUST be restored. This method is unsafe and idempotent (see 926 [RFC2616], Section 9.1). 928 Marshalling: 930 The request body MUST be a DAV:unbind XML element. 932 933 If the request succeeds, the server MUST return 200 (OK) when the 934 binding was successfully deleted. 936 If a response body for a successful request is included, it MUST 937 be a DAV:unbind-response XML element. Note that this document 938 does not define any elements for the UNBIND response body, but the 939 DAV:unbind-response element is defined to ensure interoperability 940 between future extensions that do define elements for the UNBIND 941 response body. 943 945 Preconditions: 947 (DAV:unbind-from-collection): The Request-URI MUST identify a 948 collection. 950 (DAV:unbind-source-exists): The DAV:segment element MUST identify 951 a binding in the collection identified by the Request-URI. 953 (DAV:locked-update-allowed): If the collection identified by the 954 Request-URI is write-locked, then the appropriate token MUST be 955 specified in the request. 957 (DAV:protected-url-deletion-allowed): If the binding identified by 958 the segment is protected by a write-lock, then the appropriate 959 token MUST be specified in the request. 961 Postconditions: 963 (DAV:binding-deleted): The collection MUST NOT have a binding for 964 the segment specified in the DAV:segment element in the request 965 body. 967 (DAV:lock-deleted): If the internal member URI of the binding 968 specified by the Request-URI and the DAV:segment element in the 969 request body was protected by a write-lock at the time of the 970 request, that write-lock must have been deleted by the request. 972 5.1. Example: UNBIND 974 >> Request: 976 UNBIND /CollX HTTP/1.1 977 Host: www.example.com 978 Content-Type: application/xml; charset="utf-8" 979 Content-Length: xxx 981 982 983 foo.html 984 986 >> Response: 988 HTTP/1.1 200 OK 990 The server removed the binding named "foo.html" from the collection, 991 "http://www.example.com/CollX". A request to the resource named 992 "http://www.example.com/CollX/foo.html" will return a 404 (Not Found) 993 response. 995 6. REBIND Method 997 The REBIND method removes a binding to a resource from a collection, 998 and adds a binding to that resource into the collection identified by 999 the Request-URI. The request body specifies the binding to be added 1000 (segment) and the old binding to be removed (href). It is 1001 effectively an atomic form of a MOVE request, and MUST be treated the 1002 same way as MOVE for the purpose of determining access permissions. 1004 If a REBIND request fails, the server state preceding the request 1005 MUST be restored. This method is unsafe and idempotent (see 1006 [RFC2616], Section 9.1). 1008 Marshalling: 1010 The request MAY include an Overwrite header. 1012 The request body MUST be a DAV:rebind XML element. 1014 1016 If the request succeeds, the server MUST return 201 (Created) when 1017 a new binding was created and 200 (OK) when an existing binding 1018 was replaced. 1020 If a response body for a successful request is included, it MUST 1021 be a DAV:rebind-response XML element. Note that this document 1022 does not define any elements for the REBIND response body, but the 1023 DAV:rebind-response element is defined to ensure interoperability 1024 between future extensions that do define elements for the REBIND 1025 response body. 1027 1029 Preconditions: 1031 (DAV:rebind-into-collection): The Request-URI MUST identify a 1032 collection. 1034 (DAV:rebind-source-exists): The DAV:href element MUST identify a 1035 resource. 1037 (DAV:cross-server-binding): If the resource identified by the DAV: 1038 href element in the request body is on another server from the 1039 collection identified by the Request-URI, the server MUST support 1040 cross-server bindings. 1042 (DAV:name-allowed): The name specified by the DAV:segment is 1043 available for use as a new binding name. 1045 (DAV:can-overwrite): If the collection already contains a binding 1046 with the specified path segment, and if an Overwrite header is 1047 included, the value of the Overwrite header MUST be "T". 1049 (DAV:cycle-allowed): If the DAV:href element identifies a 1050 collection, and if the Request-URI identifies a collection that is 1051 a member of that collection, the server MUST support cycles in the 1052 URI namespace. 1054 (DAV:locked-update-allowed): If the collection identified by the 1055 Request-URI is write-locked, then the appropriate token MUST be 1056 specified in the request. 1058 (DAV:protected-url-modification-allowed): If the collection 1059 identified by the Request-URI already contains a binding with the 1060 specified path segment, and if that binding is protected by a 1061 write-lock, then the appropriate token MUST be specified in the 1062 request. 1064 (DAV:locked-source-collection-update-allowed): If the collection 1065 identified by the parent collection prefix of the DAV:href URI is 1066 write-locked, then the appropriate token MUST be specified in the 1067 request. 1069 (DAV:protected-source-url-deletion-allowed): If the DAV:href URI 1070 is protected by a write lock, then the appropriate token MUST be 1071 specified in the request. 1073 Postconditions: 1075 (DAV:new-binding): The collection MUST have a binding that maps 1076 the segment specified in the DAV:segment element in the request 1077 body, to the resource that was identified by the DAV:href element 1078 in the request body. 1080 (DAV:binding-deleted): The URL specified in the DAV:href element 1081 in the request body MUST NOT be mapped to a resource. 1083 (DAV:lock-deleted): If the URL specified in the DAV:href element 1084 in the request body was protected by a write-lock at the time of 1085 the request, that write-lock must have been deleted by the 1086 request. 1088 6.1. Example: REBIND 1090 >> Request: 1092 REBIND /CollX HTTP/1.1 1093 Host: www.example.com 1094 Content-Type: application/xml; charset="utf-8" 1095 Content-Length: xxx 1097 1098 1099 foo.html 1100 http://www.example.com/CollY/bar.html 1101 1103 >> Response: 1105 HTTP/1.1 200 OK 1107 The server added a new binding to the collection, 1108 "http://www.example.com/CollX", associating "foo.html" with the 1109 resource identified by the URI 1110 "http://www.example.com/CollY/bar.html", and removes the binding 1111 named "bar.html" from the collection identified by the URI 1112 "http://www.example.com/CollY". Clients can now use the URI 1113 "http://www.example.com/CollX/foo.html" to submit requests to that 1114 resource, and requests on the URI 1115 "http://www.example.com/CollY/bar.html" will fail with a 404 (Not 1116 Found) response. 1118 6.2. Example: REBIND in presence of locks and bind loops 1120 To illustrate the effects of locks and bind loops on a REBIND 1121 operation, consider the following collection: 1123 +------------------+ 1124 | Root Collection | 1125 | bindings: | 1126 | CollW | 1127 +------------------+ 1128 | 1129 | 1130 | 1131 +-------------------------------+ 1132 | Collection C1 |<--------+ 1133 | LOCKED infinity | | 1134 | (lock token L1) | | 1135 | bindings: | | 1136 | CollX CollY | | 1137 +-------------------------------+ | 1138 | | | 1139 | | (creates loop) | 1140 | | | 1141 +-----------------+ +------------------+ | 1142 | Collection C2 | | Collection C3 | | 1143 | (inherit lock) | | (inherit lock) | | 1144 | (lock token L1) | | (lock token L1) | | 1145 | bindings: | | bindings: | | 1146 | {none} | | y.gif CollZ | | 1147 +-----------------+ +------------------+ | 1148 | | | 1149 | +-----+ 1150 | 1151 +---------------------------+ 1152 | Resource R2 | 1153 | (lock inherited from C1) | 1154 | (lock token L1) | 1155 +---------------------------+ 1157 (where L1 is "opaquelocktoken:f92d4fae-7012-11ab-a765-00c0ca1f6bf9"). 1159 Note that the binding between CollZ and C1 creates a loop in the 1160 containment hierarchy. Servers are not required to support such 1161 loops, though the server in this example does. 1163 The REBIND request below will remove the segment "CollZ" from C3 and 1164 add a new binding from "CollA" to the collection C2. 1166 REBIND /CollW/CollX HTTP/1.1 1167 Host: www.example.com 1168 If: () 1169 Content-Type: application/xml; charset="utf-8" 1170 Content-Length: xxx 1172 1173 1174 CollA 1175 /CollW/CollY/CollZ 1176 1177 The outcome of the REBIND operation is: 1179 +------------------+ 1180 | Root Collection | 1181 | bindings: | 1182 | CollW | 1183 +------------------+ 1184 | 1185 | 1186 | 1187 +-------------------------------+ 1188 | Collection C1 | 1189 | LOCKED infinity | 1190 | (lock token L1) | 1191 | bindings: | 1192 | CollX CollY | 1193 +-------------------------------+ 1194 | ^ | 1195 | | | 1196 +-----------------+ | +------------------+ 1197 | Collection C2 | | | Collection C3 | 1198 |(inherited lock) | | | (inherited lock) | 1199 |(lock token L1) | | | (lock token L1) | 1200 | bindings: | | | bindings: | 1201 | CollA | | | y.gif | 1202 +-----------------+ | +------------------+ 1203 | | | 1204 +---------------+ | 1205 (creates loop) | 1206 +---------------------------+ 1207 | Resource R2 | 1208 | (inherited lock from C1) | 1209 | (lock token L1) | 1210 +---------------------------+ 1212 7. Additional Status Codes 1214 7.1. 208 Already Reported 1216 The 208 (Already Reported) status code can be used inside a DAV: 1217 propstat response element to avoid enumerating the internal members 1218 of multiple bindings to the same collection repeatedly. For each 1219 binding to a collection inside the request's scope, only one will be 1220 reported with a 200 status, while subsequent DAV:response elements 1221 for all other bindings will use the 208 status, and no DAV:response 1222 elements for their descendants are included. 1224 Note that the 208 status will only occur for "Depth: infinity" 1225 requests, and that it is of particular importance when the multiple 1226 collection bindings cause a bind loop as discussed in Section 2.2. 1228 A client can request the DAV:resource-id property in a PROPFIND 1229 request to guarantee that they can accurately reconstruct the binding 1230 structure of a collection with multiple bindings to a single 1231 resource. 1233 For backward compatibility with clients not aware of the 208 status 1234 code appearing in multistatus response bodies, it SHOULD NOT be used 1235 unless the client has signalled support for this specification using 1236 the "DAV" request header (see Section 8.2). Instead, a 506 status 1237 should be returned when a binding loop is discovered. This allows 1238 the server to return the 506 as the top level return status, if it 1239 discovers it before it started the response, or in the middle of a 1240 multistatus, if it discovers it in the middle of streaming out a 1241 multistatus response. 1243 7.1.1. Example: PROPFIND by bind-aware client 1245 For example, consider a PROPFIND request on /Coll (bound to 1246 collection C), where the members of /Coll are /Coll/Foo (bound to 1247 resource R) and /Coll/Bar (bound to collection C). 1249 >> Request: 1251 PROPFIND /Coll/ HTTP/1.1 1252 Host: www.example.com 1253 Depth: infinity 1254 DAV: bind 1255 Content-Type: application/xml; charset="utf-8" 1256 Content-Length: xxx 1258 1259 1260 1261 1262 1263 1264 1266 >> Response: 1268 HTTP/1.1 207 Multi-Status 1269 Content-Type: application/xml; charset="utf-8" 1270 Content-Length: xxx 1272 1273 1274 1275 http://www.example.com/Coll/ 1276 1277 1278 Loop Demo 1279 1280 urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf8 1282 1283 1284 HTTP/1.1 200 OK 1285 1286 1287 1288 http://www.example.com/Coll/Foo 1289 1290 1291 Bird Inventory 1292 1293 urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf9 1295 1296 1297 HTTP/1.1 200 OK 1298 1299 1300 1301 http://www.example.com/Coll/Bar 1302 1303 1304 Loop Demo 1305 1306 urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf8 1308 1309 1310 HTTP/1.1 208 Already Reported 1311 1312 1313 1315 7.1.2. Example: PROPFIND by non-bind-aware client 1317 In this example, the client isn't aware of the 208 status code 1318 introduced by this specification. As the "Depth: infinity" PROPFIND 1319 request would cause a loop condition, the whole request is rejected 1320 with a 506 status. 1322 >> Request: 1324 PROPFIND /Coll/ HTTP/1.1 1325 Host: www.example.com 1326 Depth: infinity 1327 Content-Type: application/xml; charset="utf-8" 1328 Content-Length: xxx 1330 1331 1332 1333 1335 >> Response: 1337 HTTP/1.1 506 Loop Detected 1339 7.2. 506 Loop Detected 1341 The 506 (Loop Detected) status code indicates that the server 1342 terminated an operation because it encountered an infinite loop while 1343 processing a request with "Depth: infinity". This status indicates 1344 that the entire operation failed. 1346 8. Capability discovery 1348 8.1. OPTIONS method 1350 If the server supports bindings, it MUST return the compliance class 1351 name "bind" as a field in the "DAV" response header (see [RFC4918], 1352 Section 10.1) from an OPTIONS request on any resource implemented by 1353 that server. A value of "bind" in the "DAV" header MUST indicate 1354 that the server supports all MUST level requirements and REQUIRED 1355 features specified in this document. 1357 8.2. 'DAV' request header 1359 Clients SHOULD signal support for all MUST level requirements and 1360 REQUIRED features by submitting a "DAV" request header containing the 1361 compliance class name "bind". In particular, the client MUST 1362 understand the 208 status code defined in Section 7.1. 1364 9. Relationship to WebDAV Access Control Protocol 1366 BIND and REBIND behave the same as MOVE with respect to the DAV:acl 1367 property (see [RFC3744], Section 7.3). 1369 10. Security Considerations 1371 This section is provided to make WebDAV implementors aware of the 1372 security implications of this protocol. 1374 All of the security considerations of HTTP/1.1 and the WebDAV 1375 Distributed Authoring Protocol specification also apply to this 1376 protocol specification. In addition, bindings introduce several new 1377 security concerns and increase the risk of some existing threats. 1378 These issues are detailed below. 1380 10.1. Privacy Concerns 1382 In a context where cross-server bindings are supported, creating 1383 bindings on a trusted server may make it possible for a hostile agent 1384 to induce users to send private information to a target on a 1385 different server. 1387 10.2. Bind Loops 1389 Although bind loops were already possible in HTTP 1.1, the 1390 introduction of the BIND method creates a new avenue for clients to 1391 create loops accidentally or maliciously. If the binding and its 1392 target are on the same server, the server may be able to detect BIND 1393 requests that would create loops. Servers are required to detect 1394 loops that are caused by bindings to collections during the 1395 processing of any requests with "Depth: infinity". 1397 10.3. Bindings, and Denial of Service 1399 Denial of service attacks were already possible by posting URIs that 1400 were intended for limited use at heavily used Web sites. The 1401 introduction of BIND creates a new avenue for similar denial of 1402 service attacks. If cross-server bindings are supported, clients can 1403 now create bindings at heavily used sites to target locations that 1404 were not designed for heavy usage. 1406 10.4. Private Locations May Be Revealed 1408 If the DAV:parent-set property is maintained on a resource, the 1409 owners of the bindings risk revealing private locations. The 1410 directory structures where bindings are located are available to 1411 anyone who has access to the DAV:parent-set property on the resource. 1412 Moving a binding may reveal its new location to anyone with access to 1413 DAV:parent-set on its resource. 1415 10.5. DAV:parent-set and Denial of Service 1417 If the server maintains the DAV:parent-set property in response to 1418 bindings created in other administrative domains, it is exposed to 1419 hostile attempts to make it devote resources to adding bindings to 1420 the list. 1422 11. Internationalization Considerations 1424 All internationalization considerations mentioned in [RFC4918] also 1425 apply to this document. 1427 12. IANA Considerations 1429 Section 7 defines the HTTP status codes 208 (Already Reported) and 1430 506 (Loop Detected), to be added to the registry at 1431 . 1433 13. Acknowledgements 1435 This document is the collaborative product of the authors and Tyson 1436 Chihaya, Jim Davis, Chuck Fay and Judith Slein. This draft has 1437 benefited from thoughtful discussion by Jim Amsden, Peter Carlson, 1438 Steve Carter, Ken Coar, Ellis Cohen, Dan Connolly, Bruce Cragun, 1439 Spencer Dawkins, Mark Day, Rajiv Dulepet, David Durand, Lisa 1440 Dusseault, Stefan Eissing, Roy Fielding, Yaron Goland, Joe 1441 Hildebrand, Fred Hitt, Alex Hopmann, James Hunt, Marcus Jager, Chris 1442 Kaler, Manoj Kasichainula, Rohit Khare, Brian Korver, Daniel 1443 LaLiberte, Steve Martin, Larry Masinter, Jeff McAffer, Surendra 1444 Koduru Reddy, Max Rible, Sam Ruby, Bradley Sergeant, Nick Shelness, 1445 John Stracke, John Tigue, John Turner, Kevin Wiggen, and other 1446 members of the WebDAV working group. 1448 14. References 1449 14.1. Normative References 1451 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1452 Requirement Levels", BCP 14, RFC 2119, March 1997. 1454 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 1455 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 1456 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 1458 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1459 Resource Identifier (URI): Generic Syntax", STD 66, 1460 RFC 3986, January 2005. 1462 [RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web Distributed 1463 Authoring and Versioning (WebDAV)", RFC 4918, June 2007. 1465 [XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and 1466 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fourth 1467 Edition)", W3C REC-xml-20060816, August 2006, 1468 . 1470 14.2. Informative References 1472 [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J. 1473 Whitehead, "Versioning Extensions to WebDAV (Web 1474 Distributed Authoring and Versioning)", RFC 3253, 1475 March 2002. 1477 [RFC3744] Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web 1478 Distributed Authoring and Versioning (WebDAV) Access 1479 Control Protocol", RFC 3744, May 2004. 1481 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 1482 Unique IDentifier (UUID) URN Namespace", RFC 4122, 1483 July 2005. 1485 Appendix A. Clarification to RFC2518bis' Usage of the term 'lock root' 1487 [RFC4918], Section 9.10.1 claims: 1489 A LOCK request to an existing resource will create a lock on the 1490 resource identified by the Request-URI, provided the resource is 1491 not already locked with a conflicting lock. The resource 1492 identified in the Request-URI becomes the root of the lock. 1494 This is incorrect in that it implies that the "lock root" is a 1495 resource, not a URL 1496 (). 1497 However, should a directly locked resource have multiple bindings, 1498 only the one used in the Request-URI of the LOCK request will be the 1499 protected from changes of clients not supplying the lock token. 1501 A correct description would be: 1503 A LOCK request to an existing resource will create a lock on the 1504 resource identified by the Request-URI, provided the resource is 1505 not already locked with a conflicting lock. The Request-URI 1506 becomes the root of the lock. 1508 Note that this change makes the description consistent with the 1509 definition of the DAV:lockroot XML element in Section 14.12 of 1510 [RFC4918]. 1512 The authors of this specification recommend that future revisions of 1513 [RFC4918] will update the description as suggested above. 1515 Appendix B. Change Log (to be removed by RFC Editor before publication) 1517 B.1. Since draft-ietf-webdav-bind-02 1519 Add and resolve issues "2.3_COPY_SHARED_BINDINGS" and 1520 "2.3_MULTIPLE_COPY". Add issue "5.1_LOOP_STATUS" and proposed 1521 resolution, but keep it open. Add issues "ED_references" and 1522 "4_507_status". Started work on index. Rename document to "Binding 1523 Extensions to Web Distributed Authoring and Versioning (WebDAV)". 1524 Rename "References" to "Normative References". Close issue 1525 "ED_references". Close issue "4_507_status". 1527 B.2. Since draft-ietf-webdav-bind-03 1529 Add and close issues "9.2_redirect_loops", "ED_authors" and 1530 "ED_updates". Add section about capability discovery (DAV header). 1531 Close issues "5.1_LOOP_STATUS". Add and resolve new issue 1532 "5.1_506_STATUS_STREAMING". Update XML spec reference. Add issue 1533 "locking" and resolve as invalid. 1535 B.3. Since draft-ietf-webdav-bind-04 1537 Add and close issues "6_precondition_binding_allowed" and 1538 "6_lock_behaviour". Add mailing list and issues list pointers to 1539 front. 1541 B.4. Since draft-ietf-webdav-bind-05 1543 Editorial fixes. Add and resolve issues "1.3_error_negotiation", 1544 "2.5_language" and "7.1.1_add_resource_id". Add historical issue 1545 "4_LOCK_BEHAVIOR" and it's resolution for better tracking. 1547 B.5. Since draft-ietf-webdav-bind-06 1549 Rewrite Editorial Note. Open and resolve issues "2.6_identical", 1550 "specify_safeness_and_idempotence" and "ED_rfc2026_ref". 1552 B.6. Since draft-ietf-webdav-bind-07 1554 Add more index items (no change tracking). Add and resolve issues 1555 "2.3_copy_to_same", "bind_properties", "bind_vs_ACL", 1556 "6_rebind_intro" and "rfc2396bis" (actually an action item). Fix XML 1557 DTD fragment in section 3.3. Make spelling of "Request-URI" 1558 consistent. 1560 B.7. Since draft-ietf-webdav-bind-08 1562 Resolved editorial issues raised by Jim Whitehead in . 1564 Add and resolve issues "atomicity", "2_allow_destroy", 1565 "2.1_separate_loop_discussion", "2.1.1_bind_loops_vs_locks", 1566 "2.3_copy_depth_infinity", "2.3_copy_example", "2.3_copy_vs_loops", 1567 "2.6_resource-id_vs_versions", "3.2_example" and 1568 "6_rebind_premissions". Add issue "2.6_when_do_ids_change". Re-open 1569 and resolve "6_rebind_intro". 1571 B.8. Since draft-ietf-webdav-bind-09 1573 Add and resolve issue "6.1_rebind_vs_locks", adding proposed example 1574 text. Add action item "3.1_uuids". Close issue 1575 "2.6_when_do_ids_change". Add and resolve issues 1576 "2.6_bindings_vs_properties" and "uri_draft_ref". 1578 B.9. Since draft-ietf-webdav-bind-10 1580 Resolve action item "3.1_uuids". Add and resolve issue 1581 "2.7_unlock_vs_bindings". Revisit issue 1582 "2.6_bindings_vs_properties", and remove the part of the sentence 1583 that speaks about live properties. Update "rfc2396bis" references to 1584 "RFC3986". Add issue "9_ns_op_and_acl" and add potential resolution. 1585 Align artwork where applicable (new xml2rfc1.29rc2 feature). 1587 B.10. Since draft-ietf-webdav-bind-11 1589 Updated [draft-mealling-uuid-urn] to [RFC4122]. Add statement about 1590 live properties in Section 2.6. 1592 B.11. Since draft-ietf-webdav-bind-12 1594 Updated Author's address. Uppercase "Section" when referring to 1595 other documents. 1597 Updating from RFC2518 to RFC2518bis: 1599 o Remove own explanation of DTD syntax. 1601 o Remove own definition of precondition/postcondition. 1603 o Remove reference to broken RFC2518 language about DELETE and 1604 UNLOCK. 1606 o Remove own definition of DAV: request header. 1608 o Updated "Rationale for Distinguishing Bindings from URI Mappings" 1609 to reflect the changes in [draft-ietf-webdav-rfc2518bis], making 1610 proposals for more changes so that the issue can be closed (see 1611 also 1612 and ). 1615 B.12. Since draft-ietf-webdav-bind-13 1617 Update [draft-ietf-webdav-rfc2518-bis] to draft 14. Update one 1618 incorrect section reference. Remove Section "Rationale for 1619 Distinguishing Bindings from URI Mappings" as 1620 [draft-ietf-webdav-rfc2518-bis] now uses the proper definition of 1621 collection state. Examples use application/xml instead of text/xml 1622 MIME type. 1624 Fix IANA section (there are no IANA considerations). 1626 B.13. Since draft-ietf-webdav-bind-14 1628 Update [draft-ietf-webdav-rfc2518-bis] to draft 15. Update [XML] to 1629 4th edition. 1631 Markup ASCII art for box recognition (doesn't affect ASCII version). 1633 Identify Julian Reschke as Editor. 1635 B.14. Since draft-ietf-webdav-bind-15 1637 Fix typo in RFC2119 keywords section (sorry!). 1639 Update [draft-ietf-webdav-rfc2518-bis] to draft 17. 1641 Add and resolve issue "rfc2518bis-lock-root". 1643 B.15. Since draft-ietf-webdav-bind-16 1645 Add and resolve issue "iana-vs-http-status". 1647 B.16. Since draft-ietf-webdav-bind-17 1649 Update rfc2518bis reference to draft 18 (note that the bug reported 1650 in 1651 is still present). 1653 B.17. Since draft-ietf-webdav-bind-18 1655 Update: draft-ietf-webdav-rfc2518bis replaced by RFC4918. 1657 Appendix C. Resolved issues (to be removed by RFC Editor before 1658 publication) 1660 Issues that were either rejected or resolved in this version of this 1661 document. 1663 C.1. rfc4918 1665 Type: edit 1667 julian.reschke@greenbytes.de (2007-06-30): Update RFC2518bis 1668 reference to RFC4918. 1670 Resolution (2007-06-30): Done. 1672 Appendix D. Open issues (to be removed by RFC Editor prior to 1673 publication) 1675 D.1. edit 1677 Type: edit 1679 julian.reschke@greenbytes.de (2004-05-30): Umbrella issue for 1680 editorial fixes/enhancements. 1682 Index 1684 2 1685 208 Already Reported (status code) 29, 34 1687 5 1688 506 Loop Detected (status code) 32, 34 1690 B 1691 BIND method 19 1692 Marshalling 20 1693 Postconditions 21 1694 Preconditions 20 1695 Binding 7 1697 C 1698 Collection 7 1699 Condition Names 1700 DAV:bind-into-collection (pre) 20 1701 DAV:bind-source-exists (pre) 20 1702 DAV:binding-allowed (pre) 21 1703 DAV:binding-deleted (post) 23, 26 1704 DAV:can-overwrite (pre) 21, 25 1705 DAV:cross-server-binding (pre) 21, 25 1706 DAV:cycle-allowed (pre) 21, 25 1707 DAV:lock-deleted (post) 23, 26 1708 DAV:locked-overwrite-allowed (pre) 21 1709 DAV:locked-source-collection-update-allowed (pre) 25 1710 DAV:locked-update-allowed (pre) 21, 23, 25 1711 DAV:name-allowed (pre) 21, 25 1712 DAV:new-binding (post) 21, 26 1713 DAV:protected-source-url-deletion-allowed (pre) 26 1714 DAV:protected-url-deletion-allowed (pre) 23 1715 DAV:protected-url-modification-allowed (pre) 25 1716 DAV:rebind-from-collection (pre) 25 1717 DAV:rebind-source-exists (pre) 25 1718 DAV:unbind-from-collection (pre) 23 1719 DAV:unbind-source-exists (pre) 23 1721 D 1722 DAV header 1723 compliance class 'bind' 32 1724 DAV:bind-into-collection precondition 20 1725 DAV:bind-source-exists precondition 20 1726 DAV:binding-allowed precondition 21 1727 DAV:binding-deleted postcondition 23, 26 1728 DAV:can-overwrite precondition 21, 25 1729 DAV:cross-server-binding precondition 21, 25 1730 DAV:cycle-allowed precondition 21, 25 1731 DAV:lock-deleted postcondition 23, 26 1732 DAV:locked-overwrite-allowed precondition 21 1733 DAV:locked-source-collection-update-allowed precondition 25 1734 DAV:locked-update-allowed precondition 21, 23, 25 1735 DAV:name-allowed precondition 21, 25 1736 DAV:new-binding postcondition 21, 26 1737 DAV:parent-set property 18 1738 DAV:protected-source-url-deletion-allowed precondition 26 1739 DAV:protected-url-deletion-allowed precondition 23 1740 DAV:protected-url-modification-allowed precondition 25 1741 DAV:rebind-from-collection precondition 25 1742 DAV:rebind-source-exists precondition 25 1743 DAV:resource-id property 18 1744 DAV:unbind-from-collection precondition 23 1745 DAV:unbind-source-exists precondition 23 1747 I 1748 Internal Member URI 7 1750 M 1751 Methods 1752 BIND 19 1753 REBIND 24 1754 UNBIND 22 1756 P 1757 Path Segment 6 1758 Properties 1759 DAV:parent-set 18 1760 DAV:resource-id 18 1762 R 1763 REBIND method 24 1764 Marshalling 24 1765 Postconditions 26 1766 Preconditions 25 1768 S 1769 Status Codes 1770 208 Already Reported 29, 34 1771 506 Loop Detected 32, 34 1773 U 1774 UNBIND method 22 1775 Marshalling 22 1776 Postconditions 23 1777 Preconditions 23 1779 URI Mapping 6 1781 Authors' Addresses 1783 Geoffrey Clemm 1784 IBM 1785 20 Maguire Road 1786 Lexington, MA 02421 1788 Email: geoffrey.clemm@us.ibm.com 1790 Jason Crawford 1791 IBM Research 1792 P.O. Box 704 1793 Yorktown Heights, NY 10598 1795 Email: ccjason@us.ibm.com 1797 Julian F. Reschke (editor) 1798 greenbytes GmbH 1799 Hafenweg 16 1800 Muenster, NW 48155 1801 Germany 1803 Email: julian.reschke@greenbytes.de 1805 Jim Whitehead 1806 UC Santa Cruz, Dept. of Computer Science 1807 1156 High Street 1808 Santa Cruz, CA 95064 1810 Email: ejw@cse.ucsc.edu 1812 Full Copyright Statement 1814 Copyright (C) The IETF Trust (2007). 1816 This document is subject to the rights, licenses and restrictions 1817 contained in BCP 78, and except as set forth therein, the authors 1818 retain all their rights. 1820 This document and the information contained herein are provided on an 1821 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1822 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 1823 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 1824 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 1825 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1826 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1828 Intellectual Property 1830 The IETF takes no position regarding the validity or scope of any 1831 Intellectual Property Rights or other rights that might be claimed to 1832 pertain to the implementation or use of the technology described in 1833 this document or the extent to which any license under such rights 1834 might or might not be available; nor does it represent that it has 1835 made any independent effort to identify any such rights. Information 1836 on the procedures with respect to rights in RFC documents can be 1837 found in BCP 78 and BCP 79. 1839 Copies of IPR disclosures made to the IETF Secretariat and any 1840 assurances of licenses to be made available, or the result of an 1841 attempt made to obtain a general license or permission for the use of 1842 such proprietary rights by implementers or users of this 1843 specification can be obtained from the IETF on-line IPR repository at 1844 http://www.ietf.org/ipr. 1846 The IETF invites any interested party to bring to its attention any 1847 copyrights, patents or patent applications, or other proprietary 1848 rights that may cover technology that may be required to implement 1849 this standard. Please address the information to the IETF at 1850 ietf-ipr@ietf.org. 1852 Acknowledgment 1854 Funding for the RFC Editor function is provided by the IETF 1855 Administrative Support Activity (IASA).