idnits 2.17.1 draft-ietf-webdav-bind-10.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.a on line 22. -- Found old boilerplate from RFC 3978, Section 5.5 on line 1837. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1814. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1821. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1827. ** The document seems to lack an RFC 3978 Section 5.1 IPR Disclosure Acknowledgement. ** This document has an original RFC 3978 Section 5.4 Copyright Line, instead of the newer IETF Trust Copyright according to RFC 4748. ** This document has an original RFC 3978 Section 5.5 Disclaimer, instead of the newer disclaimer which includes the IETF Trust according to RFC 4748. ** The document uses RFC 3667 boilerplate or RFC 3978-like boilerplate instead of verbatim RFC 3978 boilerplate. After 6 May 2005, submission of drafts without verbatim RFC 3978 boilerplate is not accepted. The following non-3978 patterns matched text found in the document. That text should be removed or replaced: This document is an Internet-Draft and is subject to all provisions of Section 3 of RFC 3667. 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. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC2518, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 587 has weird spacing: '...| x.gif y.g...' == Line 609 has weird spacing: '...| x.gif y.g...' == Line 815 has weird spacing: '...| x.gif y.g...' (Using the creation date from RFC2518, updated by this document, for RFC5378 checks: 1997-07-21) -- 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 (January 5, 2005) is 7022 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 2518 (Obsoleted by RFC 4918) ** 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: 7 errors (**), 0 flaws (~~), 5 warnings (==), 9 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group G. Clemm 2 Internet-Draft IBM 3 Updates: 2518 (if approved) J. Crawford 4 Expires: July 6, 2005 IBM Research 5 J. Reschke 6 greenbytes 7 J. Whitehead 8 U.C. Santa Cruz 9 January 5, 2005 11 Binding Extensions to Web Distributed Authoring and Versioning 12 (WebDAV) 13 draft-ietf-webdav-bind-10 15 Status of this Memo 17 This document is an Internet-Draft and is subject to all provisions 18 of section 3 of RFC 3667. By submitting this Internet-Draft, each 19 author represents that any applicable patent or other IPR claims of 20 which he or she is aware have been or will be disclosed, and any of 21 which he or she become aware will be disclosed, in accordance with 22 RFC 3668. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF), its areas, and its working groups. Note that 26 other groups may also distribute working documents as 27 Internet-Drafts. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 The list of current Internet-Drafts can be accessed at 35 http://www.ietf.org/ietf/1id-abstracts.txt. 37 The list of Internet-Draft Shadow Directories can be accessed at 38 http://www.ietf.org/shadow.html. 40 This Internet-Draft will expire on July 6, 2005. 42 Copyright Notice 44 Copyright (C) The Internet Society (2005). 46 Abstract 48 This specification defines bindings, and the BIND method for creating 49 multiple bindings to the same resource. Creating a new binding to a 50 resource causes at least one new URI to be mapped to that resource. 51 Servers are required to insure the integrity of any bindings that 52 they allow to be created. 54 Editorial Note (To be removed by RFC Editor before publication) 56 Please send comments to the Distributed Authoring and Versioning 57 (WebDAV) working group at , which may be 58 joined by sending a message with subject "subscribe" to 59 . Discussions of the WEBDAV 60 working group are archived at 61 . 63 lists 64 all registered issues since draft 02. 66 Table of Contents 68 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 69 1.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 70 1.2 Rationale for Distinguishing Bindings from URI Mappings . 7 71 1.3 Method Preconditions and Postconditions . . . . . . . . . 8 72 2. Overview of Bindings . . . . . . . . . . . . . . . . . . . . . 8 73 2.1 Bindings to Collections . . . . . . . . . . . . . . . . . 9 74 2.1.1 Bind loops . . . . . . . . . . . . . . . . . . . . . . 10 75 2.2 URI Mappings Created by a new Binding . . . . . . . . . . 10 76 2.3 COPY and Bindings . . . . . . . . . . . . . . . . . . . . 11 77 2.3.1 Example: COPY with 'Depth: infinity' in presence 78 of bind loops . . . . . . . . . . . . . . . . . . . . 12 79 2.3.2 Example: COPY with 'Depth: infinity' with multiple 80 bindings to a leaf resource . . . . . . . . . . . . . 14 81 2.4 DELETE and Bindings . . . . . . . . . . . . . . . . . . . 15 82 2.5 MOVE and Bindings . . . . . . . . . . . . . . . . . . . . 15 83 2.6 PROPFIND and Bindings . . . . . . . . . . . . . . . . . . 16 84 2.7 Determining Whether Two Bindings Are to the Same 85 Resource . . . . . . . . . . . . . . . . . . . . . . . . . 16 86 2.8 Discovering the Bindings to a Resource . . . . . . . . . . 17 87 3. Properties . . . . . . . . . . . . . . . . . . . . . . . . . . 17 88 3.1 DAV:resource-id Property . . . . . . . . . . . . . . . . . 18 89 3.2 DAV:parent-set Property . . . . . . . . . . . . . . . . . 18 90 3.2.1 Example for DAV:parent-set property . . . . . . . . . 18 91 4. BIND Method . . . . . . . . . . . . . . . . . . . . . . . . . 19 92 4.1 Example: BIND . . . . . . . . . . . . . . . . . . . . . . 22 93 5. UNBIND Method . . . . . . . . . . . . . . . . . . . . . . . . 22 94 5.1 Example: UNBIND . . . . . . . . . . . . . . . . . . . . . 24 95 6. REBIND Method . . . . . . . . . . . . . . . . . . . . . . . . 24 96 6.1 Example: REBIND . . . . . . . . . . . . . . . . . . . . . 26 97 6.2 Example: REBIND in presence of locks and bind loops . . . 27 98 7. Additional Status Codes . . . . . . . . . . . . . . . . . . . 29 99 7.1 208 Already Reported . . . . . . . . . . . . . . . . . . . 29 100 7.1.1 Example: PROPFIND by bind-aware client . . . . . . . . 30 101 7.1.2 Example: PROPFIND by non-bind-aware client . . . . . . 31 102 7.2 506 Loop Detected . . . . . . . . . . . . . . . . . . . . 32 103 8. Capability discovery . . . . . . . . . . . . . . . . . . . . . 32 104 8.1 OPTIONS method . . . . . . . . . . . . . . . . . . . . . . 32 105 8.2 'DAV' request header . . . . . . . . . . . . . . . . . . . 32 106 8.2.1 Generic syntax . . . . . . . . . . . . . . . . . . . . 32 107 8.2.2 Client compliance class 'bind' . . . . . . . . . . . . 33 108 9. Security Considerations . . . . . . . . . . . . . . . . . . . 33 109 9.1 Privacy Concerns . . . . . . . . . . . . . . . . . . . . . 33 110 9.2 Bind Loops . . . . . . . . . . . . . . . . . . . . . . . . 33 111 9.3 Bindings, and Denial of Service . . . . . . . . . . . . . 33 112 9.4 Private Locations May Be Revealed . . . . . . . . . . . . 34 113 9.5 DAV:parent-set and Denial of Service . . . . . . . . . . . 34 115 10. Internationalization Considerations . . . . . . . . . . . . 34 116 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . 34 117 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 34 118 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 35 119 13.1 Normative References . . . . . . . . . . . . . . . . . . . . 35 120 13.2 Informative References . . . . . . . . . . . . . . . . . . . 35 121 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 35 122 A. Change Log (to be removed by RFC Editor before publication) . 36 123 A.1 Since draft-ietf-webdav-bind-02 . . . . . . . . . . . . . 36 124 A.2 Since draft-ietf-webdav-bind-03 . . . . . . . . . . . . . 36 125 A.3 Since draft-ietf-webdav-bind-04 . . . . . . . . . . . . . 36 126 A.4 Since draft-ietf-webdav-bind-05 . . . . . . . . . . . . . 37 127 A.5 Since draft-ietf-webdav-bind-06 . . . . . . . . . . . . . 37 128 A.6 Since draft-ietf-webdav-bind-07 . . . . . . . . . . . . . 37 129 A.7 Since draft-ietf-webdav-bind-08 . . . . . . . . . . . . . 37 130 A.8 Since draft-ietf-webdav-bind-09 . . . . . . . . . . . . . 37 131 B. Resolved issues (to be removed by RFC Editor before 132 publication) . . . . . . . . . . . . . . . . . . . . . . . . . 37 133 B.1 uri_draft_ref . . . . . . . . . . . . . . . . . . . . . . 37 134 B.2 2.6_bindings_vs_properties . . . . . . . . . . . . . . . . 38 135 B.3 2.6_when_do_ids_change . . . . . . . . . . . . . . . . . . 38 136 B.4 6.1_rebind_vs_locks . . . . . . . . . . . . . . . . . . . 38 137 C. Open issues (to be removed by RFC Editor prior to 138 publication) . . . . . . . . . . . . . . . . . . . . . . . . . 39 139 C.1 edit . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 140 C.2 3.1_uuids . . . . . . . . . . . . . . . . . . . . . . . . 39 141 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 142 Intellectual Property and Copyright Statements . . . . . . . . 42 144 1. Introduction 146 This specification extends the WebDAV Distributed Authoring Protocol 147 to enable clients to create new access paths to existing resources. 148 This capability is useful for several reasons: 150 URIs of WebDAV-compliant resources are hierarchical and correspond to 151 a hierarchy of collections in resource space. The WebDAV Distributed 152 Authoring Protocol makes it possible to organize these resources into 153 hierarchies, placing them into groupings, known as collections, which 154 are more easily browsed and manipulated than a single flat 155 collection. However, hierarchies require categorization decisions 156 that locate resources at a single location in the hierarchy, a 157 drawback when a resource has multiple valid categories. For example, 158 in a hierarchy of vehicle descriptions containing collections for 159 cars and boats, a description of a combination car/boat vehicle could 160 belong in either collection. Ideally, the description should be 161 accessible from both. Allowing clients to create new URIs that 162 access the existing resource lets them put that resource into 163 multiple collections. 165 Hierarchies also make resource sharing more difficult, since 166 resources that have utility across many collections are still forced 167 into a single collection. For example, the mathematics department at 168 one university might create a collection of information on fractals 169 that contains bindings to some local resources, but also provides 170 access to some resources at other universities. For many reasons, it 171 may be undesirable to make physical copies of the shared resources on 172 the local server: to conserve disk space, to respect copyright 173 constraints, or to make any changes in the shared resources visible 174 automatically. Being able to create new access paths to existing 175 resources in other collections or even on other servers is useful for 176 this sort of case. 178 The BIND method defined here provides a mechanism for allowing 179 clients to create alternative access paths to existing WebDAV 180 resources. HTTP [RFC2616] and WebDAV [RFC2518] methods are able to 181 work because there are mappings between URIs and resources. A method 182 is addressed to a URI, and the server follows the mapping from that 183 URI to a resource, applying the method to that resource. Multiple 184 URIs may be mapped to the same resource, but until now there has been 185 no way for clients to create additional URIs mapped to existing 186 resources. 188 BIND lets clients associate a new URI with an existing WebDAV 189 resource, and this URI can then be used to submit requests to the 190 resource. Since URIs of WebDAV resources are hierarchical, and 191 correspond to a hierarchy of collections in resource space, the BIND 192 method also has the effect of adding the resource to a collection. 193 As new URIs are associated with the resource, it appears in 194 additional collections. 196 A BIND request does not create a new resource, but simply makes 197 available a new URI for submitting requests to an existing resource. 198 The new URI is indistinguishable from any other URI when submitting a 199 request to a resource. Only one round trip is needed to submit a 200 request to the intended target. Servers are required to enforce the 201 integrity of the relationships between the new URIs and the resources 202 associated with them. Consequently, it may be very costly for 203 servers to support BIND requests that cross server boundaries. 205 This specification is organized as follows. Section 1.1 defines 206 terminology used in the rest of the specification, while Section 2 207 overviews bindings. Section 3 defines the new properties needed to 208 support multiple bindings to the same resource. Section 4 specifies 209 the BIND method, used to create multiple bindings to the same 210 resource. Section 5 specifies the UNBIND method, used to remove a 211 binding to a resource. Section 6 specifies the REBIND method, used 212 to move a binding to another collection. 214 1.1 Terminology 216 The terminology used here follows and extends that in the WebDAV 217 Distributed Authoring Protocol specification [RFC2518]. 219 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 220 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 221 document are to be interpreted as described in [RFC2119]. 223 This document uses XML DTD fragments ([XML]) as a purely notational 224 convention. WebDAV request and response bodies cannot be validated 225 due to the specific extensibility rules defined in section 23 of 226 [RFC2518] and due to the fact that all XML elements defined by this 227 specification use the XML namespace name "DAV:". In particular: 229 o Element names use the "DAV:" namespace. 231 o Element ordering is irrelevant. 233 o Extension elements/attributes (elements/attributes not already 234 defined as valid child elements) may be added anywhere, except 235 when explicitly stated otherwise. 237 URI Mapping 239 A relation between an absolute URI and a resource. For an 240 absolute URI U and the resource it identifies R, the URI mapping 241 can be thought of as (U => R). Since a resource can represent 242 items that are not network retrievable, as well as those that are, 243 it is possible for a resource to have zero, one, or many URI 244 mappings. Mapping a resource to an "http" scheme URI makes it 245 possible to submit HTTP protocol requests to the resource using 246 the URI. 248 Path Segment 250 Informally, the characters found between slashes ("/") in a URI. 251 Formally, as defined in section 3.3 of 252 [draft-fielding-uri-rfc2396bis]. 254 Binding 256 A relation between a single path segment (in a collection) and a 257 resource. A binding is part of the state of a collection. If two 258 different collections contain a binding between the same path 259 segment and the same resource, these are two distinct bindings. 260 So for a collection C, a path segment S, and a resource R, the 261 binding can be thought of as C:(S -> R). Bindings create URI 262 mappings, and hence allow requests to be sent to a single resource 263 from multiple locations in a URI namespace. For example, given a 264 collection C (accessible through the URI 265 http://www.example.com/CollX), a path segment S (equal to 266 "foo.html"), and a resource R, then creating the binding C: (S -> 267 R) makes it possible to use the URI 268 http://www.example.com/CollX/foo.html to access R. 270 Collection 272 A resource that contains, as part of its state, a set of bindings 273 that identify internal member resources. 275 Internal Member URI 277 The URI that identifies an internal member of a collection, and 278 that consists of the URI for the collection, followed by a slash 279 character ('/'), followed by the path segment of the binding for 280 that internal member. 282 1.2 Rationale for Distinguishing Bindings from URI Mappings 284 In [RFC2518], the state of a collection is defined as containing a 285 list of internal member URIs. If there are multiple mappings to a 286 collection, then the state of the collection is different when you 287 refer to it via a different URI. This is undesirable, since ideally 288 a collection's membership should remain the same, independent of 289 which URI was used to reference it. 291 The notion of binding is introduced to separate the final segment of 292 a URI from its parent collection's contribution. This done, a 293 collection can be defined as containing a set of bindings, thus 294 permitting new mappings to a collection without modifying its 295 membership. The authors of this specification anticipate and 296 recommend that future revisions of [RFC2518] will update the 297 definition of the state of a collection to correspond to the 298 definition in this document. 300 1.3 Method Preconditions and Postconditions 302 A "precondition" of a method describes the state on the server that 303 must be true for that method to be performed. A "postcondition" of a 304 method describes the state on the server that must be true after that 305 method has completed. If a method precondition or postcondition for 306 a request is not satisfied, the response status of the request MUST 307 be either 403 (Forbidden) if the request should not be repeated 308 because it will always fail, or 409 (Conflict) if it is expected that 309 the user might be able to resolve the conflict and resubmit the 310 request. 312 In order to allow better client handling of 403 and 409 responses, a 313 distinct XML element type is associated with each method precondition 314 and postcondition of a request. When a particular precondition is 315 not satisfied or a particular postcondition cannot be achieved, the 316 appropriate XML element MUST be returned as the child of a top-level 317 DAV:error element in the response body, unless otherwise negotiated 318 by the request. In a 207 Multi-Status response, the DAV:error 319 element would appear in the appropriate DAV:responsedescription 320 element. 322 2. Overview of Bindings 324 Bindings are part of the state of a collection. They define the 325 internal members of the collection, and the names of those internal 326 members. 328 Bindings are added and removed by a variety of existing HTTP methods. 329 A method that creates a new resource, such as PUT, COPY, and MKCOL, 330 adds a binding. A method that deletes a resource, such as DELETE, 331 removes a binding. A method that moves a resource (e.g. MOVE) both 332 adds a binding (in the destination collection) and removes a binding 333 (in the source collection). The BIND method introduced here provides 334 a mechanism for adding a second binding to an existing resource. 336 There is no difference between an initial binding added by PUT, COPY, 337 or MKCOL, and additional bindings added with BIND. 339 It would be very undesirable if one binding could be destroyed as a 340 side effect of operating on the resource through a different binding. 341 In particular, the removal of one binding to a resource (e.g. with a 342 DELETE or a MOVE) MUST NOT disrupt another binding to that resource, 343 e.g. by turning that binding into a dangling path segment. The 344 server MUST NOT reclaim system resources after removing one binding, 345 while other bindings to the resource remain. In other words, the 346 server MUST maintain the integrity of a binding. It is permissible, 347 however, for future method definitions (e.g., a DESTROY method) to 348 have semantics that explicitly remove all bindings and/or immediately 349 reclaim system resources. 351 2.1 Bindings to Collections 353 Creating a new binding to a collection makes each resource associated 354 with a binding in that collection accessible via a new URI, and thus 355 creates new URI mappings to those resources but no new bindings. 357 For example, suppose a new binding CollY is created for collection C1 358 in the figure below. It immediately becomes possible to access 359 resource R1 using the URI /CollY/x.gif and to access resource R2 360 using the URI /CollY/y.jpg, but no new bindings for these child 361 resources were created. This is because bindings are part of the 362 state of a collection, and associate a URI that is relative to that 363 collection with its target resource. No change to the bindings in 364 Collection C1 is needed to make its children accessible using 365 /CollY/x.gif and /CollY/y.jpg. 367 +-------------------------+ 368 | Root Collection | 369 | bindings: | 370 | CollX CollY | 371 +-------------------------+ 372 | / 373 | / 374 | / 375 +------------------+ 376 | Collection C1 | 377 | bindings: | 378 | x.gif y.jpg | 379 +------------------+ 380 | \ 381 | \ 382 | \ 383 +-------------+ +-------------+ 384 | Resource R1 | | Resource R2 | 385 +-------------+ +-------------+ 387 2.1.1 Bind loops 389 Bindings to collections can result in loops, which servers MUST 390 detect when processing "Depth: infinity" requests. It is sometimes 391 possible to complete an operation in spite of the presence of a loop. 392 For instance, a PROPFIND can still succeed if the server uses the new 393 status code 208 (Already Reported) defined in Section 7.1. 395 However, the 506 (Loop Detected) status code is defined in Section 396 7.2 for use in contexts where an operation is terminated because a 397 loop was encountered. 399 2.2 URI Mappings Created by a new Binding 401 Suppose a binding from "Binding-Name" to resource R is to be added to 402 a collection, C. Then if C-MAP is the set of URIs that were mapped 403 to C before the BIND request, then for each URI "C-URI" in C-MAP, the 404 URI "C-URI/Binding-Name" is mapped to resource R following the BIND 405 request. 407 For example, if a binding from "foo.html" to R is added to a 408 collection C, and if the following URIs are mapped to C: 410 http://www.example.com/A/1/ 411 http://example.com/A/one/ 413 then the following new mappings to R are introduced: 415 http://www.example.com/A/1/foo.html 416 http://example.com/A/one/foo.html 418 Note that if R is a collection, additional URI mappings are created 419 to the descendents of R. Also, note that if a binding is made in 420 collection C to C itself (or to a parent of C), an infinite number of 421 mappings are introduced. 423 For example, if a binding from "myself" to C is then added to C, the 424 following infinite number of additional mappings to C are introduced: 426 http://www.example.com/A/1/myself 427 http://www.example.com/A/1/myself/myself 428 ... 430 and the following infinite number of additional mappings to R are 431 introduced: 433 http://www.example.com/A/1/myself/foo.html 434 http://www.example.com/A/1/myself/myself/foo.html 435 ... 437 2.3 COPY and Bindings 439 As defined in Section 8.8 of [RFC2518], COPY causes the resource 440 identified by the Request-URI to be duplicated, and makes the new 441 resource accessible using the URI specified in the Destination 442 header. Upon successful completion of a COPY, a new binding is 443 created between the last path segment of the Destination header, and 444 the destination resource. The new binding is added to its parent 445 collection, identified by the Destination header minus its final 446 segment. 448 The following figure shows an example: Suppose that a COPY is issued 449 to URI-3 for resource R (which is also mapped to URI-1 and URI-2), 450 with the Destination header set to URI-X. After successful 451 completion of the COPY operation, resource R is duplicated to create 452 resource R', and a new binding has been created which creates at 453 least the URI mapping between URI-X and the new resource (although 454 other URI mappings may also have been created). 456 URI-1 URI-2 URI-3 URI-X 457 | | | | 458 | | | <---- URI Mappings ----> | 459 | | | | 460 +---------------------+ +------------------------+ 461 | Resource R | | Resource R' | 462 +---------------------+ +------------------------+ 464 It might be thought that a COPY request with "Depth: 0" on a 465 collection would duplicate its bindings, since bindings are part of 466 the collection's state. This is not the case, however. The 467 definition of Depth in [RFC2518] makes it clear that a "Depth: 0" 468 request does not apply to a collection's members. Consequently, a 469 COPY with "Depth: 0" does not duplicate the bindings contained by the 470 collection. 472 If a COPY request causes an existing resource to be updated, the 473 bindings to that resource MUST be unaffected by the COPY request. 474 Using the preceding example, suppose that a COPY request is issued to 475 URI-X for resource R', with the Destination header set to URI-2. The 476 content and dead properties of resource R would be updated to be a 477 copy of those of resource R', but the mappings from URI-1, URI-2, and 478 URI-3 to resource R remain unaffected. If because of multiple 479 bindings to a resource, more than one source resource updates a 480 single destination resource, the order of the updates is server 481 defined. 483 If a COPY request would cause a new resource to be created as a copy 484 of an existing resource, and that COPY request has already created a 485 copy of that existing resource, the COPY request instead creates 486 another binding to the previous copy, instead of creating a new 487 resource. 489 2.3.1 Example: COPY with 'Depth: infinity' in presence of bind loops 491 As an example of how COPY with Depth infinity would work in the 492 presence of bindings, consider the following collection: 494 +------------------+ 495 | Root Collection | 496 | bindings: | 497 | CollX | 498 +------------------+ 499 | 500 | 501 +-------------------------------+ 502 | Collection C1 |<-------+ 503 | bindings: | | 504 | x.gif CollY | | 505 +-------------------------------+ | 506 | \ (creates loop) | 507 | \ | 508 +-------------+ +------------------+ | 509 | Resource R1 | | Collection C2 | | 510 +-------------+ | bindings: | | 511 | y.gif CollZ | | 512 +------------------+ | 513 | | | 514 | +--------+ 515 | 516 +-------------+ 517 | Resource R2 | 518 +-------------+ 520 If a COPY with Depth inifinity is submitted to /CollX, with 521 destination of /CollA, the outcome of the copy operation is: 523 +------------------+ 524 | Root Collection | 525 | bindings: | 526 | CollX CollA | 527 +------------------+ 528 | | 529 | +---------------------------+ 530 | | 531 +-------------------+ | 532 | Collection C1 |<------------------+ | 533 | bindings: | | | 534 | x.gif CollY | | | 535 +-------------------+ | | 536 | \ (creates loop) | | 537 | \ | | 538 +-------------+ +-----------------+ | | 539 | Resource R1 | | Collection C2 | | | 540 +-------------+ | bindings: | | | 541 | y.gif CollZ | | | 542 +-----------------+ | | 543 | | | | 544 | +-------+ | 545 | | 546 +-------------+ | 547 | Resource R2 | | 548 +-------------+ | 549 | 550 +-------------------------------+ 551 | 552 +-------------------+ 553 | Collection C3 |<------------------+ 554 | bindings: | | 555 | x.gif CollY | | 556 +-------------------+ | 557 | \ (creates loop) | 558 | \ | 559 +-------------+ +-----------------+ | 560 | Resource R3 | | Collection C4 | | 561 +-------------+ | bindings: | | 562 | y.gif CollZ | | 563 +-----------------+ | 564 | | | 565 | +-------+ 566 | 567 +-------------+ 568 | Resource R4 | 569 +-------------+ 571 2.3.2 Example: COPY with 'Depth: infinity' with multiple bindings to a 572 leaf resource 574 Given the following collection hierarchy: 576 +------------------+ 577 | Root Collection | 578 | bindings: | 579 | CollX | 580 +------------------+ 581 | 582 | 583 | 584 +----------------+ 585 | Collection C1 | 586 | bindings: | 587 | x.gif y.gif | 588 +----------------+ 589 | | 590 | | 591 +-------------+ 592 | Resource R1 | 593 +-------------+ 595 A COPY of /CollX with Depth infinity to /CollY results in the 596 following collection hierarchy: 598 +------------------+ 599 | Root Collection | 600 | bindings: | 601 | CollX CollY | 602 +------------------+ 603 | \ 604 | \ 605 | \ 606 +----------------+ +-----------------+ 607 | Collection C1 | | Collection C2 | 608 | bindings: | | bindings: | 609 | x.gif y.gif | | x.gif y.gif | 610 +----------------+ +-----------------+ 611 | | | | 612 | | | | 613 +-------------+ +-------------+ 614 | Resource R1 | | Resource R2 | 615 +-------------+ +-------------+ 617 2.4 DELETE and Bindings 619 When there are multiple bindings to a resource, a DELETE applied to 620 that resource MUST NOT remove any bindings to that resource other 621 than the one identified by the Request-URI. For example, suppose the 622 collection identified by the URI "/a" has a binding named "x" to a 623 resource R, and another collection identified by "/b" has a binding 624 named "y" to the same resource R. Then a DELETE applied to "/a/x" 625 removes the binding named "x" from "/a" but MUST NOT remove the 626 binding named "y" from "/b" (i.e. after the DELETE, "/y/b" continues 627 to identify the resource R). In particular, although Section 8.6.1 628 of [RFC2518] states that during DELETE processing, a server "MUST 629 remove any URI for the resource identified by the Request-URI from 630 collections which contain it as a member", a server that supports the 631 binding protocol MUST NOT follow this requirement. 633 When DELETE is applied to a collection, it MUST NOT modify the 634 membership of any other collection that is not itself a member of the 635 collection being deleted. For example, if both "/a/.../x" and 636 "/b/.../y" identify the same collection, C, then applying DELETE to 637 "/a" must not delete an internal member from C or from any other 638 collection that is a member of C, because that would modify the 639 membership of "/b". 641 If a collection supports the UNBIND method (see Section 5), a DELETE 642 of an internal member of a collection MAY be implemented as an UNBIND 643 request. In this case, applying DELETE to a Request-URI has the 644 effect of removing the binding identified by the final segment of the 645 Request-URI from the collection identified by the Request-URI minus 646 its final segment. Although [RFC2518] allows a DELETE to be a 647 non-atomic operation, when the DELETE operation is implemented as an 648 UNBIND, the operation is atomic. In particular, a DELETE on a 649 hierarchy of resources is simply the removal of a binding to the 650 collection identified by the Request-URI. 652 2.5 MOVE and Bindings 654 When MOVE is applied to a resource, the other bindings to that 655 resource MUST be unaffected, and if the resource being moved is a 656 collection, the bindings to any members of that collection MUST be 657 unaffected. Also, if MOVE is used with Overwrite:T to delete an 658 existing resource, the constraints specified for DELETE apply. 660 If the destination collection of a MOVE request supports the REBIND 661 method (see Section 6), a MOVE of a resource into that collection MAY 662 be implemented as a REBIND request. Although [RFC2518] allows a MOVE 663 to be a non-atomic operation, when the MOVE operation is implemented 664 as a REBIND, the operation is atomic. In particular, applying a MOVE 665 to a Request-URI and a Destination URI has the effect of removing a 666 binding to a resource (at the Request-URI), and creating a new 667 binding to that resource (at the Destination URI). Even when the 668 Request-URI identifies a collection, the MOVE operation involves only 669 removing one binding to that collection and adding another. 671 As an example, suppose that a MOVE is issued to URI-3 for resource R 672 below (which is also mapped to URI-1 and URI-2), with the Destination 673 header set to URI-X. After successful completion of the MOVE 674 operation, a new binding has been created which creates the URI 675 mapping between URI-X and resource R. The binding corresponding to 676 the final segment of URI-3 has been removed, which also causes the 677 URI mapping between URI-3 and R to be removed. If resource R were a 678 collection, old URI-3 based mappings to members of R would have been 679 removed, and new URI-X based mappings to members of R would have been 680 created. 682 >> Before Request: 684 URI-1 URI-2 URI-3 685 | | | 686 | | | <---- URI Mappings 687 | | | 688 +---------------------+ 689 | Resource R | 690 +---------------------+ 692 >> After Request: 694 URI-1 URI-2 URI-X 695 | | | 696 | | | <---- URI Mappings 697 | | | 698 +---------------------+ 699 | Resource R | 700 +---------------------+ 702 2.6 PROPFIND and Bindings 704 Consistent with [RFC2518] the value of a dead property MUST be, and 705 the value of a live property SHOULD be, independent of the number of 706 bindings to its host resource or of the path submitted to PROPFIND. 708 2.7 Determining Whether Two Bindings Are to the Same Resource 710 It is useful to have some way of determining whether two bindings are 711 to the same resource. Two resources might have identical contents 712 and properties, but not be the same resource (e.g. an update to one 713 resource does not affect the other resource). 715 The REQUIRED DAV:resource-id property defined in Section 3.1 is a 716 resource identifier, which MUST be unique across all resources for 717 all time. If the values of DAV:resource-id returned by PROPFIND 718 requests through two bindings are identical character by character, 719 the client can be assured that the two bindings are to the same 720 resource. 722 The DAV:resource-id property is created, and its value assigned, when 723 the resource is created. The value of DAV:resource-id MUST NOT be 724 changed. Even after the resource is no longer accessible through any 725 URI, that value MUST NOT be reassigned to another resource's 726 DAV:resource-id property. 728 Any method that creates a new resource MUST assign a new, unique 729 value to its DAV:resource-id property. For example, a PUT applied to 730 a null resource, COPY (when not overwriting an existing target) and 731 CHECKIN (see [RFC3253], section 4.4) must assign a new, unique value 732 to the DAV:resource-id property of the new resource they create. 734 On the other hand, any method that affects an existing resource must 735 not change the value of its DAV:resource-id property. Specifically, 736 a PUT or a COPY that updates an existing resource must not change the 737 value of its DAV:resource-id property. A REBIND, since it does not 738 create a new resource, but only changes the location of an existing 739 resource, must not change the value of the DAV:resource-id property. 741 2.8 Discovering the Bindings to a Resource 743 An OPTIONAL DAV:parent-set property on a resource provides a list of 744 the bindings that associate a collection and a URI segment with that 745 resource. If the DAV:parent-set property exists on a given resource, 746 it MUST contain a complete list of all bindings to that resource that 747 the client is authorized to see. When deciding whether to support 748 the DAV:parent-set property, server implementers / administrators 749 should balance the benefits it provides against the cost of 750 maintaining the property and the security risks enumerated in 751 Sections 9.4 and 9.5. 753 3. Properties 755 The bind feature introduces the following properties for a resource. 757 A DAV:allprop PROPFIND request SHOULD NOT return any of the 758 properties defined by this document. This allows a binding server to 759 perform efficiently when a naive client, which does not understand 760 the cost of asking a server to compute all possible live properties, 761 issues a DAV:allprop PROPFIND request. 763 3.1 DAV:resource-id Property 765 The DAV:resource-id property is a REQUIRED property that enables 766 clients to determine whether two bindings are to the same resource. 767 The value of DAV:resource-id is a URI, and may use any registered URI 768 scheme that guarantees the uniqueness of the value across all 769 resources for all time (e.g. the opaquelocktoken: scheme defined in 770 [RFC2518]). 772 774 3.2 DAV:parent-set Property 776 The DAV:parent-set property is an OPTIONAL property that enables 777 clients to discover what collections contain a binding to this 778 resource (i.e. what collections have that resource as an internal 779 member). It contains an of href/segment pair for each collection 780 that has a binding to the resource. The href identifies the 781 collection, and the segment identifies the binding name of that 782 resource in that collection. 784 A given collection MUST appear only once in the DAV:parent-set for 785 any given binding, even if there are multiple URI mappings to that 786 collection. 788 789 790 791 794 3.2.1 Example for DAV:parent-set property 796 For example, if collection C1 is mapped to both /CollX and /CollY, 797 and C1 contains a binding named "x.gif" to a resource R1, then either 798 [/CollX, x.gif] or [/CollY, x.gif] can appear in the DAV:parent-set 799 of R1, but not both. But if C1 also had a binding named "y.gif" to 800 R1, then there would be two entries for C1 in the DAV:binding-set of 801 R1 (i.e. both [/CollX, x.gif] and [/CollX, y.gif] or, alternatively, 802 both [/CollY, x.gif] and [/CollY, y.gif]). 804 +-------------------------+ 805 | Root Collection | 806 | bindings: | 807 | CollX CollY | 808 +-------------------------+ 809 | / 810 | / 811 | / 812 +-----------------+ 813 | Collection C1 | 814 | bindings: | 815 | x.gif y.gif | 816 +-----------------+ 817 | | 818 | | 819 | | 820 +--------------+ 821 | Resource R1 | 822 +--------------+ 824 In this case, one possible value for DAV:parent-set property on 825 "/CollX/x.gif" would be: 827 828 829 /CollX 830 x.gif 831 832 833 /CollX 834 y.gif 835 836 838 4. BIND Method 840 The BIND method modifies the collection identified by the 841 Request-URI, by adding a new binding from the segment specified in 842 the BIND body to the resource identified in the BIND body. 844 If a server cannot guarantee the integrity of the binding, the BIND 845 request MUST fail. Note that it is especially difficult to maintain 846 the integrity of cross-server bindings. Unless the server where the 847 resource resides knows about all bindings on all servers to that 848 resource, it may unwittingly destroy the resource or make it 849 inaccessible without notifying another server that manages a binding 850 to the resource. For example, if server A permits creation of a 851 binding to a resource on server B, server A must notify server B 852 about its binding and must have an agreement with B that B will not 853 destroy the resource while A's binding exists. Otherwise server B 854 may receive a DELETE request that it thinks removes the last binding 855 to the resource and destroy the resource while A's binding still 856 exists. The precondition DAV:cross-server-binding is defined below 857 for cases where servers fail cross-server BIND requests because they 858 cannot guarantee the integrity of cross-server bindings. 860 By default, if there already is a binding for the specified segment 861 in the collection, the new binding replaces the existing binding. 862 This default binding replacement behavior can be overridden using the 863 Overwrite header defined in Section 9.6 of [RFC2518]. 865 If a BIND request fails, the server state preceding the request MUST 866 be restored. This method is unsafe and idempotent (see [RFC2616], 867 section 9.1). 869 Marshalling: 871 The request MAY include an Overwrite header. 873 The request body MUST be a DAV:bind XML element. 875 877 If the request succeeds, the server MUST return 201 (Created) when 878 a new binding was created and 200 (OK) when an existing binding 879 was replaced. 881 If a response body for a successful request is included, it MUST 882 be a DAV:bind-response XML element. Note that this document does 883 not define any elements for the BIND response body, but the 884 DAV:bind-response element is defined to ensure interoperability 885 between future extensions that do define elements for the BIND 886 response body. 888 890 Preconditions: 892 (DAV:bind-into-collection): The Request-URI MUST identify a 893 collection. 895 (DAV:bind-source-exists): The DAV:href element MUST identify a 896 resource. 898 (DAV:binding-allowed): The resource identified by the DAV:href 899 supports multiple bindings to it. 901 (DAV:cross-server-binding): If the resource identified by the 902 DAV:href element in the request body is on another server from the 903 collection identified by the Request-URI, the server MUST support 904 cross-server bindings. 906 (DAV:name-allowed): The name specified by the DAV:segment is 907 available for use as a new binding name. 909 (DAV:can-overwrite): If the collection already contains a binding 910 with the specified path segment, and if an Overwrite header is 911 included, the value of the Overwrite header MUST be "T". 913 (DAV:cycle-allowed): If the DAV:href element identifies a 914 collection, and if the Request-URI identifies a collection that is 915 a member of that collection, the server MUST support cycles in the 916 URI namespace. 918 (DAV:locked-update-allowed): If the collection identified by the 919 Request-URI is write-locked, then the appropriate token MUST be 920 specified in an If request header. 922 (DAV:locked-overwrite-allowed): If the collection already contains 923 a binding with the specified path segment, and if that binding is 924 protected by a write-lock, then the appropriate token MUST be 925 specified in an If request header. 927 Postconditions: 929 (DAV:new-binding): The collection MUST have a binding that maps 930 the segment specified in the DAV:segment element in the request 931 body, to the resource identified by the DAV:href element in the 932 request body. 934 4.1 Example: BIND 936 >> Request: 938 BIND /CollY HTTP/1.1 939 Host: www.example.com 940 Content-Type: text/xml; charset="utf-8" 941 Content-Length: xxx 943 944 945 bar.html 946 http://www.example.com/CollX/foo.html 947 949 >> Response: 951 HTTP/1.1 201 Created 953 The server added a new binding to the collection, 954 "http://www.example.com/CollY", associating "bar.html" with the 955 resource identified by the URI 956 "http://www.example.com/CollX/foo.html". Clients can now use the URI 957 "http://www.example.com/CollY/bar.html" to submit requests to that 958 resource. 960 5. UNBIND Method 962 The UNBIND method modifies the collection identified by the 963 Request-URI, by removing the binding identified by the segment 964 specified in the UNBIND body. 966 Once a resource is unreachable by any URI mapping, the server MAY 967 reclaim system resources associated with that resource. If UNBIND 968 removes a binding to a resource, but there remain URI mappings to 969 that resource, the server MUST NOT reclaim system resources 970 associated with the resource. 972 If an UNBIND request fails, the server state preceding the request 973 MUST be restored. This method is unsafe and idempotent (see 974 [RFC2616], section 9.1). 976 Marshalling: 978 The request body MUST be a DAV:unbind XML element. 980 981 If the request succeeds, the server MUST return 200 (OK) when the 982 binding was successfully deleted. 984 If a response body for a successful request is included, it MUST 985 be a DAV:unbind-response XML element. Note that this document 986 does not define any elements for the UNBIND response body, but the 987 DAV:unbind-response element is defined to ensure interoperability 988 between future extensions that do define elements for the UNBIND 989 response body. 991 993 Preconditions: 995 (DAV:unbind-from-collection): The Request-URI MUST identify a 996 collection. 998 (DAV:unbind-source-exists): The DAV:segment element MUST identify 999 a binding in the collection identified by the Request-URI. 1001 (DAV:locked-update-allowed): If the collection identified by the 1002 Request-URI is write-locked, then the appropriate token MUST be 1003 specified in the request. 1005 (DAV:protected-url-deletion-allowed): If the binding identified by 1006 the segment is protected by a write-lock, then the appropriate 1007 token MUST be specified in the request. 1009 Postconditions: 1011 (DAV:binding-deleted): The collection MUST NOT have a binding for 1012 the segment specified in the DAV:segment element in the request 1013 body. 1015 (DAV:lock-deleted): If the internal member URI of the binding 1016 specified by the Request-URI and the DAV:segment element in the 1017 request body was protected by a write-lock at the time of the 1018 request, that write-lock must have been deleted by the request. 1020 5.1 Example: UNBIND 1022 >> Request: 1024 UNBIND /CollX HTTP/1.1 1025 Host: www.example.com 1026 Content-Type: text/xml; charset="utf-8" 1027 Content-Length: xxx 1029 1030 1031 foo.html 1032 1034 >> Response: 1036 HTTP/1.1 200 OK 1038 The server removed the binding named "foo.html" from the collection, 1039 "http://www.example.com/CollX". A request to the resource named 1040 "http://www.example.com/CollX/foo.html" will return a 404 (Not Found) 1041 response. 1043 6. REBIND Method 1045 The REBIND method removes a binding to a resource from a collection, 1046 and adds a binding to that resource into the collection identified by 1047 the Request-URI. The request body specifies the binding to be added 1048 (segment) and the old binding to be removed (href). It is 1049 effectively an atomic form of a MOVE request, and MUST be treated the 1050 same way as MOVE for the purpose of determining access permissions. 1052 If a REBIND request fails, the server state preceding the request 1053 MUST be restored. This method is unsafe and idempotent (see 1054 [RFC2616], section 9.1). 1056 Marshalling: 1058 The request MAY include an Overwrite header. 1060 The request body MUST be a DAV:rebind XML element. 1062 1064 If the request succeeds, the server MUST return 201 (Created) when 1065 a new binding was created and 200 (OK) when an existing binding 1066 was replaced. 1068 If a response body for a successful request is included, it MUST 1069 be a DAV:rebind-response XML element. Note that this document 1070 does not define any elements for the REBIND response body, but the 1071 DAV:rebind-response element is defined to ensure interoperability 1072 between future extensions that do define elements for the REBIND 1073 response body. 1075 1077 Preconditions: 1079 (DAV:rebind-into-collection): The Request-URI MUST identify a 1080 collection. 1082 (DAV:rebind-source-exists): The DAV:href element MUST identify a 1083 resource. 1085 (DAV:cross-server-binding): If the resource identified by the 1086 DAV:href element in the request body is on another server from the 1087 collection identified by the Request-URI, the server MUST support 1088 cross-server bindings. 1090 (DAV:name-allowed): The name specified by the DAV:segment is 1091 available for use as a new binding name. 1093 (DAV:can-overwrite): If the collection already contains a binding 1094 with the specified path segment, and if an Overwrite header is 1095 included, the value of the Overwrite header MUST be "T". 1097 (DAV:cycle-allowed): If the DAV:href element identifies a 1098 collection, and if the Request-URI identifies a collection that is 1099 a member of that collection, the server MUST support cycles in the 1100 URI namespace. 1102 (DAV:locked-update-allowed): If the collection identified by the 1103 Request-URI is write-locked, then the appropriate token MUST be 1104 specified in the request. 1106 (DAV:protected-url-modification-allowed): If the collection 1107 identified by the Request-URI already contains a binding with the 1108 specified path segment, and if that binding is protected by a 1109 write-lock, then the appropriate token MUST be specified in the 1110 request. 1112 (DAV:locked-source-collection-update-allowed): If the collection 1113 identified by the parent collection prefix of the DAV:href URI is 1114 write-locked, then the appropriate token MUST be specified in the 1115 request. 1117 (DAV:protected-source-url-deletion-allowed): If the DAV:href URI 1118 is protected by a write lock, then the appropriate token MUST be 1119 specified in the request. 1121 Postconditions: 1123 (DAV:new-binding): The collection MUST have a binding that maps 1124 the segment specified in the DAV:segment element in the request 1125 body, to the resource that was identified by the DAV:href element 1126 in the request body. 1128 (DAV:binding-deleted): The URL specified in the DAV:href element 1129 in the request body MUST NOT be mapped to a resource. 1131 (DAV:lock-deleted): If the URL specified in the DAV:href element 1132 in the request body was protected by a write-lock at the time of 1133 the request, that write-lock must have been deleted by the 1134 request. 1136 6.1 Example: REBIND 1138 >> Request: 1140 REBIND /CollX HTTP/1.1 1141 Host: www.example.com 1142 Content-Type: text/xml; charset="utf-8" 1143 Content-Length: xxx 1145 1146 1147 foo.html 1148 http://www.example.com/CollY/bar.html 1149 1151 >> Response: 1153 HTTP/1.1 200 OK 1155 The server added a new binding to the collection, 1156 "http://www.example.com/CollX", associating "foo.html" with the 1157 resource identified by the URI 1158 "http://www.example.com/CollY/bar.html", and removes the binding 1159 named "bar.html" from the collection identified by the URI 1160 "http://www.example.com/CollY". Clients can now use the URI 1161 "http://www.example.com/CollX/foo.html" to submit requests to that 1162 resource, and requests on the URI 1163 "http://www.example.com/CollY/bar.html" will fail with a 404 (Not 1164 Found) response. 1166 6.2 Example: REBIND in presence of locks and bind loops 1168 To illustrate the effects of locks and bind loops on a REBIND 1169 operation, consider the following collection: 1171 +------------------+ 1172 | Root Collection | 1173 | bindings: | 1174 | CollW | 1175 +------------------+ 1176 | 1177 | 1178 | 1179 +-------------------------------+ 1180 | Collection C1 |<--------+ 1181 | LOCKED infinity | | 1182 | (lock token L1) | | 1183 | bindings: | | 1184 | CollX CollY | | 1185 +-------------------------------+ | 1186 | | | 1187 | | (creates loop) | 1188 | | | 1189 +-----------------+ +------------------+ | 1190 | Collection C2 | | Collection C3 | | 1191 | (inherit lock) | | (inherit lock) | | 1192 | (lock token L1) | | (lock token L1) | | 1193 | bindings: | | bindings: | | 1194 | {none} | | y.gif CollZ | | 1195 +-----------------+ +------------------+ | 1196 | | | 1197 | +-----+ 1198 | 1199 +---------------------------+ 1200 | Resource R2 | 1201 | (lock inherited from C1) | 1202 | (lock token L1) | 1203 +---------------------------+ 1205 (where L1 is "opaquelocktoken:f92d4fae-7012-11ab-a765-00c0ca1f6bf9"). 1207 Note that the binding between CollZ and C1 creates a loop in the 1208 containment hierarchy. Servers are not required to support such 1209 loops, though the server in this example does. 1211 The REBIND request below will remove the segment "CollZ" from C3 and 1212 add a new binding from "CollA" to the collection C2. 1214 REBIND /CollW/CollX HTTP/1.1 1215 Host: www.example.com 1216 If: () 1217 Content-Type: text/xml; charset="utf-8" 1218 Content-Length: xxx 1220 1221 1222 CollA 1223 /CollW/CollY/CollZ 1224 1225 The outcome of the REBIND operation is: 1227 +------------------+ 1228 | Root Collection | 1229 | bindings: | 1230 | CollW | 1231 +------------------+ 1232 | 1233 | 1234 | 1235 +-------------------------------+ 1236 | Collection C1 | 1237 | LOCKED infinity | 1238 | (lock token L1) | 1239 | bindings: | 1240 | CollX CollY | 1241 +-------------------------------+ 1242 | ^ | 1243 | | | 1244 +-----------------+ | +------------------+ 1245 | Collection C2 | | | Collection C3 | 1246 |(inherited lock) | | | (inherited lock) | 1247 |(lock token L1) | | | (lock token L1) | 1248 | bindings: | | | bindings: | 1249 | CollA | | | y.gif | 1250 +-----------------+ | +------------------+ 1251 | | | 1252 +---------------+ | 1253 (creates loop) | 1254 +---------------------------+ 1255 | Resource R2 | 1256 | (inherited lock from C1) | 1257 | (lock token L1) | 1258 +---------------------------+ 1260 7. Additional Status Codes 1262 7.1 208 Already Reported 1264 The 208 (Already Reported) status code can be used inside a 1265 DAV:propstat response element to avoid enumerating the internal 1266 members of multiple bindings to the same collection repeatedly. For 1267 each binding to a collection inside the request's scope, only one 1268 will be reported with a 200 status, while subsequent DAV:response 1269 elements for all other bindings will use the 208 status, and no 1270 DAV:response elements for their descendants are included. 1272 Note that the 208 status will only occur for "Depth: infinity" 1273 requests, and that it is of particular importance when the multiple 1274 collection bindings cause a bind loop as discussed in Section 2.2. 1276 A client can request the DAV:resourceid property in a PROPFIND 1277 request to guarantee that they can accurately reconstruct the binding 1278 structure of a collection with multiple bindings to a single 1279 resource. 1281 For backward compatibility with clients not aware of the 208 status 1282 code appearing in multistatus response bodies, it SHOULD NOT be used 1283 unless the client has signalled support for this specification using 1284 the "DAV" request header (see Section 8.2). Instead, a 506 status 1285 should be returned when a binding loop is discovered. This allows 1286 the server to return the 506 as the top level return status, if it 1287 discovers it before it started the response, or in the middle of a 1288 multistatus, if it discovers it in the middle of streaming out a 1289 multistatus response. 1291 7.1.1 Example: PROPFIND by bind-aware client 1293 For example, consider a PROPFIND request on /Coll (bound to 1294 collection C), where the members of /Coll are /Coll/Foo (bound to 1295 resource R) and /Coll/Bar (bound to collection C). 1297 >> Request: 1299 PROPFIND /Coll/ HTTP/1.1 1300 Host: www.example.com 1301 Depth: infinity 1302 DAV: bind 1303 Content-Type: text/xml; charset="utf-8" 1304 Content-Length: xxx 1306 1307 1308 1309 1310 1311 1312 1314 >> Response: 1316 HTTP/1.1 207 Multi-Status 1317 Content-Type: text/xml; charset="utf-8" 1318 Content-Length: xxx 1319 1320 1321 1322 http://www.example.com/Coll/ 1323 1324 1325 Loop Demo 1326 1327 opaquelocktoken:f81d4fae-7dec-11d0-a765-00a0c91e6bf8 1329 1330 1331 HTTP/1.1 200 OK 1332 1333 1334 1335 http://www.example.com/Coll/Foo 1336 1337 1338 Bird Inventory 1339 1340 opaquelocktoken:f81d4fae-7dec-11d0-a765-00a0c91e6bf9 1342 1343 1344 HTTP/1.1 200 OK 1345 1346 1347 1348 http://www.example.com/Coll/Bar 1349 1350 1351 Loop Demo 1352 1353 opaquelocktoken:f81d4fae-7dec-11d0-a765-00a0c91e6bf8 1355 1356 1357 HTTP/1.1 208 Already Reported 1358 1359 1360 1362 7.1.2 Example: PROPFIND by non-bind-aware client 1364 In this example, the client isn't aware of the 208 status code 1365 introduced by this specification. As the "Depth: infinity" PROPFIND 1366 request would cause a loop condition, the whole request is rejected 1367 with a 506 status. 1369 >> Request: 1371 PROPFIND /Coll/ HTTP/1.1 1372 Host: www.example.com 1373 Depth: infinity 1374 Content-Type: text/xml; charset="utf-8" 1375 Content-Length: xxx 1377 1378 1379 1380 1382 >> Response: 1384 HTTP/1.1 506 Loop Detected 1386 7.2 506 Loop Detected 1388 The 506 (Loop Detected) status code indicates that the server 1389 terminated an operation because it encountered an infinite loop while 1390 processing a request with "Depth: infinity". This status indicates 1391 that the entire operation failed. 1393 8. Capability discovery 1395 8.1 OPTIONS method 1397 If the server supports bindings, it MUST return the compliance class 1398 name "bind" as a field in the "DAV" response header (see [RFC2518], 1399 section 9.1) from an OPTIONS request on any resource implemented by 1400 that server. A value of "bind" in the "DAV" header MUST indicate 1401 that the server supports all MUST level requirements and REQUIRED 1402 features specified in this document. 1404 8.2 'DAV' request header 1406 8.2.1 Generic syntax 1408 This specification introduces the 'DAV' request header that allows 1409 clients to signal compliance to specific WebDAV features. It has the 1410 same syntax as the response header defined in [RFC2518], section 9.1, 1411 but MAY be used with any method. 1413 Note that clients MUST NOT submit a specific compliance class name in 1414 the request header unless the specification defining this compliance 1415 class specifically defines its semantics for clients. 1417 Note that if a server chooses to vary the result of a request based 1418 on values in the "DAV" header, the response either MUST NOT be 1419 cacheable or the server MUST mark the response accordingly using the 1420 "Vary" header (see [RFC2616], section 14.44). 1422 8.2.2 Client compliance class 'bind' 1424 Clients SHOULD signal support for all MUST level requirements and 1425 REQUIRED features by submitting a "DAV" request header containing the 1426 compliance class name "bind". In particular, the client MUST 1427 understand the 208 status code defined in Section 7.1. 1429 9. Security Considerations 1431 This section is provided to make WebDAV implementors aware of the 1432 security implications of this protocol. 1434 All of the security considerations of HTTP/1.1 and the WebDAV 1435 Distributed Authoring Protocol specification also apply to this 1436 protocol specification. In addition, bindings introduce several new 1437 security concerns and increase the risk of some existing threats. 1438 These issues are detailed below. 1440 9.1 Privacy Concerns 1442 In a context where cross-server bindings are supported, creating 1443 bindings on a trusted server may make it possible for a hostile agent 1444 to induce users to send private information to a target on a 1445 different server. 1447 9.2 Bind Loops 1449 Although bind loops were already possible in HTTP 1.1, the 1450 introduction of the BIND method creates a new avenue for clients to 1451 create loops accidentally or maliciously. If the binding and its 1452 target are on the same server, the server may be able to detect BIND 1453 requests that would create loops. Servers are required to detect 1454 loops that are caused by bindings to collections during the 1455 processing of any requests with "Depth: infinity". 1457 9.3 Bindings, and Denial of Service 1459 Denial of service attacks were already possible by posting URIs that 1460 were intended for limited use at heavily used Web sites. The 1461 introduction of BIND creates a new avenue for similar denial of 1462 service attacks. If cross-server bindings are supported, clients can 1463 now create bindings at heavily used sites to target locations that 1464 were not designed for heavy usage. 1466 9.4 Private Locations May Be Revealed 1468 If the DAV:parent-set property is maintained on a resource, the 1469 owners of the bindings risk revealing private locations. The 1470 directory structures where bindings are located are available to 1471 anyone who has access to the DAV:parent-set property on the resource. 1472 Moving a binding may reveal its new location to anyone with access to 1473 DAV:parent-set on its resource. 1475 9.5 DAV:parent-set and Denial of Service 1477 If the server maintains the DAV:parent-set property in response to 1478 bindings created in other administrative domains, it is exposed to 1479 hostile attempts to make it devote resources to adding bindings to 1480 the list. 1482 10. Internationalization Considerations 1484 All internationalization considerations mentioned in [RFC2518] also 1485 apply to this document. 1487 11. IANA Considerations 1489 All IANA considerations mentioned in [RFC2518] also apply to this 1490 document. 1492 12. Acknowledgements 1494 This document is the collaborative product of the authors and Tyson 1495 Chihaya, Jim Davis, Chuck Fay and Judith Slein. This draft has 1496 benefited from thoughtful discussion by Jim Amsden, Peter Carlson, 1497 Steve Carter, Ken Coar, Ellis Cohen, Dan Connolly, Bruce Cragun, 1498 Spencer Dawkins, Mark Day, Rajiv Dulepet, David Durand, Lisa 1499 Dusseault, Stefan Eissing, Roy Fielding, Yaron Goland, Joe 1500 Hildebrand, Fred Hitt, Alex Hopmann, James Hunt, Marcus Jager, Chris 1501 Kaler, Manoj Kasichainula, Rohit Khare, Brian Korver, Daniel 1502 LaLiberte, Steve Martin, Larry Masinter, Jeff McAffer, Surendra 1503 Koduru Reddy, Max Rible, Sam Ruby, Bradley Sergeant, Nick Shelness, 1504 John Stracke, John Tigue, John Turner, Kevin Wiggen, and other 1505 members of the WebDAV working group. 1507 13. References 1509 13.1 Normative References 1511 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1512 Requirement Levels", BCP 14, RFC 2119, March 1997. 1514 [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S. and D. 1515 Jensen, "HTTP Extensions for Distributed Authoring -- 1516 WEBDAV", RFC 2518, February 1999. 1518 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 1519 Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext 1520 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 1522 [XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E. and 1523 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Third 1524 Edition)", W3C REC-xml-20040204, February 2004, 1525 . 1527 [draft-fielding-uri-rfc2396bis] 1528 Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform 1529 Resource Identifier (URI): Generic Syntax", 1530 draft-fielding-uri-rfc2396bis-07 (work in progress), 1531 September 2004. 1533 13.2 Informative References 1535 [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C. and J. 1536 Whitehead, "Versioning Extensions to WebDAV (Web 1537 Distributed Authoring and Versioning)", RFC 3253, March 1538 2002. 1540 Authors' Addresses 1542 Geoffrey Clemm 1543 IBM 1544 20 Maguire Road 1545 Lexington, MA 02421 1547 EMail: geoffrey.clemm@us.ibm.com 1548 Jason Crawford 1549 IBM Research 1550 P.O. Box 704 1551 Yorktown Heights, NY 10598 1553 EMail: ccjason@us.ibm.com 1555 Julian F. Reschke 1556 greenbytes GmbH 1557 Salzmannstrasse 152 1558 Muenster, NW 48159 1559 Germany 1561 EMail: julian.reschke@greenbytes.de 1563 Jim Whitehead 1564 UC Santa Cruz, Dept. of Computer Science 1565 1156 High Street 1566 Santa Cruz, CA 95064 1568 EMail: ejw@cse.ucsc.edu 1570 Appendix A. Change Log (to be removed by RFC Editor before publication) 1572 A.1 Since draft-ietf-webdav-bind-02 1574 Add and resolve issues "2.3_COPY_SHARED_BINDINGS" and 1575 "2.3_MULTIPLE_COPY". Add issue "5.1_LOOP_STATUS" and proposed 1576 resolution, but keep it open. Add issues "ED_references" and 1577 "4_507_status". Started work on index. Rename document to "Binding 1578 Extensions to Web Distributed Authoring and Versioning (WebDAV)". 1579 Rename "References" to "Normative References". Close issue 1580 "ED_references". Close issue "4_507_status". 1582 A.2 Since draft-ietf-webdav-bind-03 1584 Add and close issues "9.2_redirect_loops", "ED_authors" and 1585 "ED_updates". Add section about capability discovery (DAV header). 1586 Close issues "5.1_LOOP_STATUS". Add and resolve new issue 1587 "5.1_506_STATUS_STREAMING". Update XML spec reference. Add issue 1588 "locking" and resolve as invalid. 1590 A.3 Since draft-ietf-webdav-bind-04 1592 Add and close issues "6_precondition_binding_allowed" and 1593 "6_lock_behaviour". Add mailing list and issues list pointers to 1594 front. 1596 A.4 Since draft-ietf-webdav-bind-05 1598 Editorial fixes. Add and resolve issues "1.3_error_negotiation", 1599 "2.5_language" and "7.1.1_add_resource_id". Add historical issue 1600 "4_LOCK_BEHAVIOR" and it's resolution for better tracking. 1602 A.5 Since draft-ietf-webdav-bind-06 1604 Rewrite Editorial Note. Open and resolve issues "2.6_identical", 1605 "specify_safeness_and_idempotence" and "ED_rfc2026_ref". 1607 A.6 Since draft-ietf-webdav-bind-07 1609 Add more index items (no change tracking). Add and resolve issues 1610 "2.3_copy_to_same", "bind_properties", "bind_vs_ACL", 1611 "6_rebind_intro" and "rfc2396bis" (actually an action item). Fix XML 1612 DTD fragment in section 3.3. Make spelling of "Request-URI" 1613 consistent. 1615 A.7 Since draft-ietf-webdav-bind-08 1617 Resolved editorial issues raised by Jim Whitehead in 1618 . Add and resolve issues "atomicity", "2_allow_destroy", 1620 "2.1_separate_loop_discussion", "2.1.1_bind_loops_vs_locks", 1621 "2.3_copy_depth_infinity", "2.3_copy_example", "2.3_copy_vs_loops", 1622 "2.6_resource-id_vs_versions", "3.2_example" and 1623 "6_rebind_premissions". Add issue "2.6_when_do_ids_change". Re-open 1624 and resolve "6_rebind_intro". 1626 A.8 Since draft-ietf-webdav-bind-09 1628 Add and resolve issue "6.1_rebind_vs_locks", adding proposed example 1629 text. Add action item "3.1_uuids". Close issue 1630 "2.6_when_do_ids_change". Add and resolve issues 1631 "2.6_bindings_vs_properties" and "uri_draft_ref". 1633 Appendix B. Resolved issues (to be removed by RFC Editor before 1634 publication) 1636 Issues that were either rejected or resolved in this version of this 1637 document. 1639 B.1 uri_draft_ref 1641 Type: edit 1642 julian.reschke@greenbytes.de (2005-01-01): Fix reference to 1643 draft-fielding-uri-rfc2396bis-07 1645 B.2 2.6_bindings_vs_properties 1647 Type: change 1649 1652 ejw@cs.ucsc.edu (2004-12-06): I think it would be good to include the 1653 following language in the bind specification: Note that, consistent 1654 with [RFC2518], the value of a dead property is independent of the 1655 number of bindings to its host resource, and of the path submitted to 1656 PROPFIND. Since live properties can be aribtrary computational 1657 processes, they MAY vary depending on path or number of bindings, but 1658 SHOULD NOT do this unless the definition of the live property 1659 explicitly includes this dependency. Here I avoided adding new 1660 requirements in areas already covered by 2518, but did add 1661 requirements for the new situation raised by the BIND specification. 1663 Resolution (2004-12-14): Add that statement (see 1664 http://lists.w3.org/Archives/Public/w3c-dist-auth/2004OctDec/0299.htm 1665 l and subsequent messages). 1667 B.3 2.6_when_do_ids_change 1669 Type: change 1671 1674 ejw@cs.ucsc.edu (2004-11-29): Change "must not" to "MUST NOT" (and 1675 eliminate the "For example" at the start of the sentence -- perhaps 1676 change to "Specifically," 1678 julian.reschke@greenbytes.de (2004-11-30): Fix language, replace MOVE 1679 by REBIND (because MOVE may be implemented as COPY/DELETE). Unclear 1680 whether we need more changes. 1682 Resolution (2004-12-13): Closed (see 1683 http://lists.w3.org/Archives/Public/w3c-dist-auth/2004OctDec/0300.htm 1684 l). 1686 B.4 6.1_rebind_vs_locks 1688 Type: change 1689 1692 ejw@cs.ucsc.edu (2004-12-09): (Request to add a REBIND example that 1693 requires submitting a lock token) 1695 Resolution (2004-12-21): Example added. 1697 Appendix C. Open issues (to be removed by RFC Editor prior to 1698 publication) 1700 C.1 edit 1702 Type: edit 1704 julian.reschke@greenbytes.de (2004-05-30): Umbrella issue for 1705 editorial fixes/enhancements. 1707 C.2 3.1_uuids 1709 Type: edit 1711 julian.reschke@greenbytes.de (2004-12-11): Action item: if 1712 draft-mealling-uuid-urn gets accepted in time, consider referencing 1713 it and using urn:uuid URIs instead of opaquelocktoken URIs. See IETF 1714 I-D Tracker. 1716 Index 1718 2 1719 208 Already Reported (status code) 29 1721 5 1722 506 Loop Detected (status code) 32 1724 B 1725 BIND method 19 1726 Binding 7 1728 C 1729 Collection 7 1730 Condition Names 1731 DAV:bind-into-collection (pre) 20 1732 DAV:bind-source-exists (pre) 20 1733 DAV:binding-allowed (pre) 20 1734 DAV:binding-deleted (post) 23, 26 1735 DAV:can-overwrite (pre) 21, 25 1736 DAV:cross-server-binding (pre) 21, 25 1737 DAV:cycle-allowed (pre) 21, 25 1738 DAV:lock-deleted (post) 23, 26 1739 DAV:locked-overwrite-allowed (pre) 21 1740 DAV:locked-source-collection-update-allowed (pre) 25 1741 DAV:locked-update-allowed (pre) 21, 23, 25 1742 DAV:name-allowed (pre) 21, 25 1743 DAV:new-binding (post) 21, 26 1744 DAV:protected-source-url-deletion-allowed (pre) 26 1745 DAV:protected-url-deletion-allowed (pre) 23 1746 DAV:protected-url-modification-allowed (pre) 25 1747 DAV:rebind-from-collection (pre) 25 1748 DAV:rebind-source-exists (pre) 25 1749 DAV:unbind-from-collection (pre) 23 1750 DAV:unbind-source-exists (pre) 23 1752 D 1753 DAV header 1754 compliance class 'bind' 32 1755 DAV:bind-into-collection precondition 20 1756 DAV:bind-source-exists precondition 20 1757 DAV:binding-allowed precondition 20 1758 DAV:binding-deleted postcondition 23, 26 1759 DAV:can-overwrite precondition 21, 25 1760 DAV:cross-server-binding precondition 21, 25 1761 DAV:cycle-allowed precondition 21, 25 1762 DAV:lock-deleted postcondition 23, 26 1763 DAV:locked-overwrite-allowed precondition 21 1764 DAV:locked-source-collection-update-allowed precondition 25 1765 DAV:locked-update-allowed precondition 21, 23, 25 1766 DAV:name-allowed precondition 21, 25 1767 DAV:new-binding postcondition 21, 26 1768 DAV:parent-set property 18 1769 DAV:protected-source-url-deletion-allowed precondition 26 1770 DAV:protected-url-deletion-allowed precondition 23 1771 DAV:protected-url-modification-allowed precondition 25 1772 DAV:rebind-from-collection precondition 25 1773 DAV:rebind-source-exists precondition 25 1774 DAV:resource-id property 18 1775 DAV:unbind-from-collection precondition 23 1776 DAV:unbind-source-exists precondition 23 1778 I 1779 Internal Member URI 7 1781 M 1782 Methods 1783 BIND 19 1784 REBIND 24 1785 UNBIND 22 1787 P 1788 Path Segment 7 1789 Properties 1790 DAV:parent-set 18 1791 DAV:resource-id 18 1793 R 1794 REBIND method 24 1796 S 1797 Status Codes 1798 208 Already Reported 29 1799 506 Loop Detected 32 1801 U 1802 UNBIND method 22 1803 URI Mapping 6 1805 Intellectual Property Statement 1807 The IETF takes no position regarding the validity or scope of any 1808 Intellectual Property Rights or other rights that might be claimed to 1809 pertain to the implementation or use of the technology described in 1810 this document or the extent to which any license under such rights 1811 might or might not be available; nor does it represent that it has 1812 made any independent effort to identify any such rights. Information 1813 on the procedures with respect to rights in RFC documents can be 1814 found in BCP 78 and BCP 79. 1816 Copies of IPR disclosures made to the IETF Secretariat and any 1817 assurances of licenses to be made available, or the result of an 1818 attempt made to obtain a general license or permission for the use of 1819 such proprietary rights by implementers or users of this 1820 specification can be obtained from the IETF on-line IPR repository at 1821 http://www.ietf.org/ipr. 1823 The IETF invites any interested party to bring to its attention any 1824 copyrights, patents or patent applications, or other proprietary 1825 rights that may cover technology that may be required to implement 1826 this standard. Please address the information to the IETF at 1827 ietf-ipr@ietf.org. 1829 Disclaimer of Validity 1831 This document and the information contained herein are provided on an 1832 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1833 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 1834 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 1835 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 1836 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1837 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1839 Copyright Statement 1841 Copyright (C) The Internet Society (2005). This document is subject 1842 to the rights, licenses and restrictions contained in BCP 78, and 1843 except as set forth therein, the authors retain all their rights. 1845 Acknowledgment 1847 Funding for the RFC Editor function is currently provided by the 1848 Internet Society.