idnits 2.17.1 draft-ietf-webdav-bind-09.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 23. -- Found old boilerplate from RFC 3978, Section 5.5 on line 1875. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 1852. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 1859. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 1865. ** 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 591 has weird spacing: '...| x.gif y.g...' == Line 613 has weird spacing: '...| x.gif y.g...' == Line 813 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 (December 9, 2004) is 7075 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. -------------------------------------------------------------------------------- 2 Network Working Group G. Clemm 3 Internet-Draft IBM 4 Updates: 2518 (if approved) J. Crawford 5 Expires: June 9, 2005 IBM Research 6 J. Reschke 7 greenbytes 8 J. Whitehead 9 U.C. Santa Cruz 10 December 9, 2004 12 Binding Extensions to Web Distributed Authoring and Versioning 13 (WebDAV) 14 draft-ietf-webdav-bind-09 16 Status of this Memo 18 This document is an Internet-Draft and is subject to all provisions 19 of section 3 of RFC 3667. By submitting this Internet-Draft, each 20 author represents that any applicable patent or other IPR claims of 21 which he or she is aware have been or will be disclosed, and any of 22 which he or she become aware will be disclosed, in accordance with 23 RFC 3668. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF), its areas, and its working groups. Note that 27 other groups may also distribute working documents as 28 Internet-Drafts. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 The list of current Internet-Drafts can be accessed at 36 http://www.ietf.org/ietf/1id-abstracts.txt. 38 The list of Internet-Draft Shadow Directories can be accessed at 39 http://www.ietf.org/shadow.html. 41 This Internet-Draft will expire on June 9, 2005. 43 Copyright Notice 45 Copyright (C) The Internet Society (2004). 47 Abstract 49 This specification defines bindings, and the BIND method for creating 50 multiple bindings to the same resource. Creating a new binding to a 51 resource causes at least one new URI to be mapped to that resource. 52 Servers are required to insure the integrity of any bindings that 53 they allow to be created. 55 Editorial Note (To be removed by RFC Editor before publication) 57 Please send comments to the Distributed Authoring and Versioning 58 (WebDAV) working group at , which may be 59 joined by sending a message with subject "subscribe" to 60 . Discussions of the WEBDAV 61 working group are archived at 62 . 64 lists 65 all registered issues since draft 02. 67 Table of Contents 69 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 70 1.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 71 1.2 Rationale for Distinguishing Bindings from URI Mappings . 7 72 1.3 Method Preconditions and Postconditions . . . . . . . . . 8 73 2. Overview of Bindings . . . . . . . . . . . . . . . . . . . . . 8 74 2.1 Bindings to Collections . . . . . . . . . . . . . . . . . 9 75 2.1.1 Bind loops . . . . . . . . . . . . . . . . . . . . . . 10 76 2.2 URI Mappings Created by a new Binding . . . . . . . . . . 10 77 2.3 COPY and Bindings . . . . . . . . . . . . . . . . . . . . 11 78 2.3.1 Example: COPY with 'Depth: infinity' in presence 79 of bind loops . . . . . . . . . . . . . . . . . . . . 12 80 2.3.2 Example: COPY with 'Depth: infinity' with multiple 81 bindings to a leaf resource . . . . . . . . . . . . . 14 82 2.4 DELETE and Bindings . . . . . . . . . . . . . . . . . . . 15 83 2.5 MOVE and Bindings . . . . . . . . . . . . . . . . . . . . 15 84 2.6 Determining Whether Two Bindings Are to the Same 85 Resource . . . . . . . . . . . . . . . . . . . . . . . . . 16 86 2.7 Discovering the Bindings to a Resource . . . . . . . . . . 17 87 3. Properties . . . . . . . . . . . . . . . . . . . . . . . . . . 17 88 3.1 DAV:resource-id Property . . . . . . . . . . . . . . . . . 17 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 7. Additional Status Codes . . . . . . . . . . . . . . . . . . . 27 98 7.1 208 Already Reported . . . . . . . . . . . . . . . . . . . 27 99 7.1.1 Example: PROPFIND by bind-aware client . . . . . . . . 27 100 7.1.2 Example: PROPFIND by non-bind-aware client . . . . . . 29 101 7.2 506 Loop Detected . . . . . . . . . . . . . . . . . . . . 29 102 8. Capability discovery . . . . . . . . . . . . . . . . . . . . . 30 103 8.1 OPTIONS method . . . . . . . . . . . . . . . . . . . . . . 30 104 8.2 'DAV' request header . . . . . . . . . . . . . . . . . . . 30 105 8.2.1 Generic syntax . . . . . . . . . . . . . . . . . . . . 30 106 8.2.2 Client compliance class 'bind' . . . . . . . . . . . . 30 107 9. Security Considerations . . . . . . . . . . . . . . . . . . . 30 108 9.1 Privacy Concerns . . . . . . . . . . . . . . . . . . . . . 31 109 9.2 Bind Loops . . . . . . . . . . . . . . . . . . . . . . . . 31 110 9.3 Bindings, and Denial of Service . . . . . . . . . . . . . 31 111 9.4 Private Locations May Be Revealed . . . . . . . . . . . . 31 112 9.5 DAV:parent-set and Denial of Service . . . . . . . . . . . 31 113 10. Internationalization Considerations . . . . . . . . . . . . 31 114 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . 32 115 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 32 116 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 32 117 13.1 Normative References . . . . . . . . . . . . . . . . . . . . 32 118 13.2 Informative References . . . . . . . . . . . . . . . . . . . 32 119 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 33 120 A. Change Log (to be removed by RFC Editor before publication) . 33 121 A.1 Since draft-ietf-webdav-bind-02 . . . . . . . . . . . . . 33 122 A.2 Since draft-ietf-webdav-bind-03 . . . . . . . . . . . . . 34 123 A.3 Since draft-ietf-webdav-bind-04 . . . . . . . . . . . . . 34 124 A.4 Since draft-ietf-webdav-bind-05 . . . . . . . . . . . . . 34 125 A.5 Since draft-ietf-webdav-bind-06 . . . . . . . . . . . . . 34 126 A.6 Since draft-ietf-webdav-bind-07 . . . . . . . . . . . . . 34 127 A.7 Since draft-ietf-webdav-bind-08 . . . . . . . . . . . . . 34 128 B. Resolved issues (to be removed by RFC Editor before 129 publication) . . . . . . . . . . . . . . . . . . . . . . . . . 35 130 B.1 2_allow_destroy . . . . . . . . . . . . . . . . . . . . . 35 131 B.2 2.1_separate_loop_discussion . . . . . . . . . . . . . . . 35 132 B.3 2.1.1_bind_loops_vs_locks . . . . . . . . . . . . . . . . 35 133 B.4 2.3_copy_depth_infinity . . . . . . . . . . . . . . . . . 36 134 B.5 2.3_copy_vs_loops . . . . . . . . . . . . . . . . . . . . 36 135 B.6 2.3_copy_example . . . . . . . . . . . . . . . . . . . . . 37 136 B.7 2.6_resource-id_vs_versions . . . . . . . . . . . . . . . 37 137 B.8 3.2_example . . . . . . . . . . . . . . . . . . . . . . . 37 138 B.9 atomicity . . . . . . . . . . . . . . . . . . . . . . . . 38 139 B.10 6_rebind_intro . . . . . . . . . . . . . . . . . . . . . . 38 140 B.11 6_rebind_premissions . . . . . . . . . . . . . . . . . . . 38 141 C. Open issues (to be removed by RFC Editor prior to 142 publication) . . . . . . . . . . . . . . . . . . . . . . . . . 39 143 C.1 edit . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 144 C.2 2.6_when_do_ids_change . . . . . . . . . . . . . . . . . . 39 145 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 146 Intellectual Property and Copyright Statements . . . . . . . . 42 148 1. Introduction 150 This specification extends the WebDAV Distributed Authoring Protocol 151 to enable clients to create new access paths to existing resources. 152 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 [RFC2518] 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 [RFC2518]. 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 purely notational 228 convention. WebDAV request and response bodies cannot be validated 229 due to the specific extensibility rules defined in section 23 of 230 [RFC2518] and due to the fact that all XML elements defined by this 231 specification use the XML namespace name "DAV:". In particular: 233 o Element names use the "DAV:" namespace. 235 o Element ordering is irrelevant. 237 o Extension elements/attributes (elements/attributes not already 238 defined as valid child elements) may be added anywhere, except 239 when explicitly stated otherwise. 241 URI Mapping 243 A relation between an absolute URI and a resource. For an 244 absolute URI U and the resource it identifies R, the URI mapping 245 can be thought of as (U => R). Since a resource can represent 246 items that are not network retrievable, as well as those that are, 247 it is possible for a resource to have zero, one, or many URI 248 mappings. Mapping a resource to an "http" scheme URI makes it 249 possible to submit HTTP protocol requests to the resource using 250 the URI. 252 Path Segment 254 Informally, the characters found between slashes ("/") in a URI. 255 Formally, as defined in section 3.3 of 256 [draft-fielding-rfc2396bis]. 258 Binding 260 A relation between a single path segment (in a collection) and a 261 resource. A binding is part of the state of a collection. If two 262 different collections contain a binding between the same path 263 segment and the same resource, these are two distinct bindings. 264 So for a collection C, a path segment S, and a resource R, the 265 binding can be thought of as C:(S -> R). Bindings create URI 266 mappings, and hence allow requests to be sent to a single resource 267 from multiple locations in a URI namespace. For example, given a 268 collection C (accessible through the URI 269 http://www.example.com/CollX), a path segment S (equal to 270 "foo.html"), and a resource R, then creating the binding C: (S -> 271 R) makes it possible to use the URI 272 http://www.example.com/CollX/foo.html to access R. 274 Collection 276 A resource that contains, as part of its state, a set of bindings 277 that identify internal member resources. 279 Internal Member URI 281 The URI that identifies an internal member of a collection, and 282 that consists of the URI for the collection, followed by a slash 283 character ('/'), followed by the path segment of the binding for 284 that internal member. 286 1.2 Rationale for Distinguishing Bindings from URI Mappings 288 In [RFC2518], the state of a collection is defined as containing a 289 list of internal member URIs. If there are multiple mappings to a 290 collection, then the state of the collection is different when you 291 refer to it via a different URI. This is undesirable, since ideally 292 a collection's membership should remain the same, independent of 293 which URI was used to reference it. 295 The notion of binding is introduced to separate the final segment of 296 a URI from its parent collection's contribution. This done, a 297 collection can be defined as containing a set of bindings, thus 298 permitting new mappings to a collection without modifying its 299 membership. The authors of this specification anticipate and 300 recommend that future revisions of [RFC2518] will update the 301 definition of the state of a collection to correspond to the 302 definition in this document. 304 1.3 Method Preconditions and Postconditions 306 A "precondition" of a method describes the state on the server that 307 must be true for that method to be performed. A "postcondition" of a 308 method describes the state on the server that must be true after that 309 method has completed. If a method precondition or postcondition for 310 a request is not satisfied, the response status of the request MUST 311 be either 403 (Forbidden) if the request should not be repeated 312 because it will always fail, or 409 (Conflict) if it is expected that 313 the user might be able to resolve the conflict and resubmit the 314 request. 316 In order to allow better client handling of 403 and 409 responses, a 317 distinct XML element type is associated with each method precondition 318 and postcondition of a request. When a particular precondition is 319 not satisfied or a particular postcondition cannot be achieved, the 320 appropriate XML element MUST be returned as the child of a top-level 321 DAV:error element in the response body, unless otherwise negotiated 322 by the request. In a 207 Multi-Status response, the DAV:error 323 element would appear in the appropriate DAV:responsedescription 324 element. 326 2. Overview of Bindings 328 Bindings are part of the state of a collection. They define the 329 internal members of the collection, and the names of those internal 330 members. 332 Bindings are added and removed by a variety of existing HTTP methods. 333 A method that creates a new resource, such as PUT, COPY, and MKCOL, 334 adds a binding. A method that deletes a resource, such as DELETE, 335 removes a binding. A method that moves a resource (e.g. MOVE) both 336 adds a binding (in the destination collection) and removes a binding 337 (in the source collection). The BIND method introduced here provides 338 a mechanism for adding a second binding to an existing resource. 340 There is no difference between an initial binding added by PUT, COPY, 341 or MKCOL, and additional bindings added with BIND. 343 It would be very undesirable if one binding could be destroyed as a 344 side effect of operating on the resource through a different binding. 345 In particular, the removal of one binding to a resource (e.g. with a 346 DELETE or a MOVE) MUST NOT disrupt another binding to that resource, 347 e.g. by turning that binding into a dangling path segment. The 348 server MUST NOT reclaim system resources after removing one binding, 349 while other bindings to the resource remain. In other words, the 350 server MUST maintain the integrity of a binding. It is permissible, 351 however, for future method definitions (e.g., a DESTROY method) to 352 have semantics that explicitly remove all bindings and/or immediately 353 reclaim system resources. 355 2.1 Bindings to Collections 357 Creating a new binding to a collection makes each resource associated 358 with a binding in that collection accessible via a new URI, and thus 359 creates new URI mappings to those resources but no new bindings. 361 For example, suppose a new binding CollY is created for collection C1 362 in the figure below. It immediately becomes possible to access 363 resource R1 using the URI /CollY/x.gif and to access resource R2 364 using the URI /CollY/y.jpg, but no new bindings for these child 365 resources were created. This is because bindings are part of the 366 state of a collection, and associate a URI that is relative to that 367 collection with its target resource. No change to the bindings in 368 Collection C1 is needed to make its children accessible using 369 /CollY/x.gif and /CollY/y.jpg. 371 +-------------------------+ 372 | Root Collection | 373 | bindings: | 374 | CollX CollY | 375 +-------------------------+ 376 | / 377 | / 378 | / 379 +------------------+ 380 | Collection C1 | 381 | bindings: | 382 | x.gif y.jpg | 383 +------------------+ 384 | \ 385 | \ 386 | \ 387 +-------------+ +-------------+ 388 | Resource R1 | | Resource R2 | 389 +-------------+ +-------------+ 391 2.1.1 Bind loops 393 Bindings to collections can result in loops, which servers MUST 394 detect when processing "Depth: infinity" requests. It is sometimes 395 possible to complete an operation in spite of the presence of a loop. 396 For instance, a PROPFIND can still succeed if the server uses the new 397 status code 208 (Already Reported) defined in Section 7.1. 399 However, the 506 (Loop Detected) status code is defined in Section 400 7.2 for use in contexts where an operation is terminated because a 401 loop was encountered. 403 2.2 URI Mappings Created by a new Binding 405 Suppose a binding from "Binding-Name" to resource R is to be added to 406 a collection, C. Then if C-MAP is the set of URIs that were mapped 407 to C before the BIND request, then for each URI "C-URI" in C-MAP, the 408 URI "C-URI/Binding-Name" is mapped to resource R following the BIND 409 request. 411 For example, if a binding from "foo.html" to R is added to a 412 collection C, and if the following URIs are mapped to C: 414 http://www.example.com/A/1/ 415 http://example.com/A/one/ 417 then the following new mappings to R are introduced: 419 http://www.example.com/A/1/foo.html 420 http://example.com/A/one/foo.html 422 Note that if R is a collection, additional URI mappings are created 423 to the descendents of R. Also, note that if a binding is made in 424 collection C to C itself (or to a parent of C), an infinite number of 425 mappings are introduced. 427 For example, if a binding from "myself" to C is then added to C, the 428 following infinite number of additional mappings to C are introduced: 430 http://www.example.com/A/1/myself 431 http://www.example.com/A/1/myself/myself 432 ... 434 and the following infinite number of additional mappings to R are 435 introduced: 437 http://www.example.com/A/1/myself/foo.html 438 http://www.example.com/A/1/myself/myself/foo.html 439 ... 441 2.3 COPY and Bindings 443 As defined in Section 8.8 of [RFC2518], COPY causes the resource 444 identified by the Request-URI to be duplicated, and makes the new 445 resource accessible using the URI specified in the Destination 446 header. Upon successful completion of a COPY, a new binding is 447 created between the last path segment of the Destination header, and 448 the destination resource. The new binding is added to its parent 449 collection, identified by the Destination header minus its final 450 segment. 452 The following figure shows an example: Suppose that a COPY is issued 453 to URI-3 for resource R (which is also mapped to URI-1 and URI-2), 454 with the Destination header set to URI-X. After successful 455 completion of the COPY operation, resource R is duplicated to create 456 resource R', and a new binding has been created which creates at 457 least the URI mapping between URI-X and the new resource (although 458 other URI mappings may also have been created). 460 URI-1 URI-2 URI-3 URI-X 461 | | | | 462 | | | <---- URI Mappings ----> | 463 | | | | 464 +---------------------+ +------------------------+ 465 | Resource R | | Resource R' | 466 +---------------------+ +------------------------+ 468 It might be thought that a COPY request with "Depth: 0" on a 469 collection would duplicate its bindings, since bindings are part of 470 the collection's state. This is not the case, however. The 471 definition of Depth in [RFC2518] makes it clear that a "Depth: 0" 472 request does not apply to a collection's members. Consequently, a 473 COPY with "Depth: 0" does not duplicate the bindings contained by the 474 collection. 476 If a COPY request causes an existing resource to be updated, the 477 bindings to that resource MUST be unaffected by the COPY request. 478 Using the preceding example, suppose that a COPY request is issued to 479 URI-X for resource R', with the Destination header set to URI-2. The 480 content and dead properties of resource R would be updated to be a 481 copy of those of resource R', but the mappings from URI-1, URI-2, and 482 URI-3 to resource R remain unaffected. If because of multiple 483 bindings to a resource, more than one source resource updates a 484 single destination resource, the order of the updates is server 485 defined. 487 If a COPY request would cause a new resource to be created as a copy 488 of an existing resource, and that COPY request has already created a 489 copy of that existing resource, the COPY request instead creates 490 another binding to the previous copy, instead of creating a new 491 resource. 493 2.3.1 Example: COPY with 'Depth: infinity' in presence of bind loops 495 As an example of how COPY with Depth infinity would work in the 496 presence of bindings, consider the following collection: 498 +------------------+ 499 | Root Collection | 500 | bindings: | 501 | CollX | 502 +------------------+ 503 | 504 | 505 +-------------------------------+ 506 | Collection C1 |<-------+ 507 | bindings: | | 508 | x.gif CollY | | 509 +-------------------------------+ | 510 | \ (creates loop) | 511 | \ | 512 +-------------+ +------------------+ | 513 | Resource R1 | | Collection C2 | | 514 +-------------+ | bindings: | | 515 | y.gif CollZ | | 516 +------------------+ | 517 | | | 518 | +--------+ 519 | 520 +-------------+ 521 | Resource R2 | 522 +-------------+ 524 If a COPY with Depth inifinity is submitted to /CollX, with 525 destination of /CollA, the outcome of the copy operation is: 527 +------------------+ 528 | Root Collection | 529 | bindings: | 530 | CollX CollA | 531 +------------------+ 532 | | 533 | +---------------------------+ 534 | | 535 +-------------------+ | 536 | Collection C1 |<------------------+ | 537 | bindings: | | | 538 | x.gif CollY | | | 539 +-------------------+ | | 540 | \ (creates loop) | | 541 | \ | | 542 +-------------+ +-----------------+ | | 543 | Resource R1 | | Collection C2 | | | 544 +-------------+ | bindings: | | | 545 | y.gif CollZ | | | 546 +-----------------+ | | 547 | | | | 548 | +-------+ | 549 | | 550 +-------------+ | 551 | Resource R2 | | 552 +-------------+ | 553 | 554 +-------------------------------+ 555 | 556 +-------------------+ 557 | Collection C3 |<------------------+ 558 | bindings: | | 559 | x.gif CollY | | 560 +-------------------+ | 561 | \ (creates loop) | 562 | \ | 563 +-------------+ +-----------------+ | 564 | Resource R3 | | Collection C4 | | 565 +-------------+ | bindings: | | 566 | y.gif CollZ | | 567 +-----------------+ | 568 | | | 569 | +-------+ 570 | 571 +-------------+ 572 | Resource R4 | 573 +-------------+ 575 2.3.2 Example: COPY with 'Depth: infinity' with multiple bindings to a 576 leaf resource 578 Given the following collection hierarchy: 580 +------------------+ 581 | Root Collection | 582 | bindings: | 583 | CollX | 584 +------------------+ 585 | 586 | 587 | 588 +----------------+ 589 | Collection C1 | 590 | bindings: | 591 | x.gif y.gif | 592 +----------------+ 593 | | 594 | | 595 +-------------+ 596 | Resource R1 | 597 +-------------+ 599 A COPY of /CollX with Depth infinity to /CollY results in the 600 following collection hierarchy: 602 +------------------+ 603 | Root Collection | 604 | bindings: | 605 | CollX CollY | 606 +------------------+ 607 | \ 608 | \ 609 | \ 610 +----------------+ +-----------------+ 611 | Collection C1 | | Collection C2 | 612 | bindings: | | bindings: | 613 | x.gif y.gif | | x.gif y.gif | 614 +----------------+ +-----------------+ 615 | | | | 616 | | | | 617 +-------------+ +-------------+ 618 | Resource R1 | | Resource R2 | 619 +-------------+ +-------------+ 621 2.4 DELETE and Bindings 623 When there are multiple bindings to a resource, a DELETE applied to 624 that resource MUST NOT remove any bindings to that resource other 625 than the one identified by the Request-URI. For example, suppose the 626 collection identified by the URI "/a" has a binding named "x" to a 627 resource R, and another collection identified by "/b" has a binding 628 named "y" to the same resource R. Then a DELETE applied to "/a/x" 629 removes the binding named "x" from "/a" but MUST NOT remove the 630 binding named "y" from "/b" (i.e. after the DELETE, "/y/b" continues 631 to identify the resource R). In particular, although Section 8.6.1 632 of [RFC2518] states that during DELETE processing, a server "MUST 633 remove any URI for the resource identified by the Request-URI from 634 collections which contain it as a member", a server that supports the 635 binding protocol MUST NOT follow this requirement. 637 When DELETE is applied to a collection, it MUST NOT modify the 638 membership of any other collection that is not itself a member of the 639 collection being deleted. For example, if both "/a/.../x" and 640 "/b/.../y" identify the same collection, C, then applying DELETE to 641 "/a" must not delete an internal member from C or from any other 642 collection that is a member of C, because that would modify the 643 membership of "/b". 645 If a collection supports the UNBIND method (see Section 5), a DELETE 646 of an internal member of a collection MAY be implemented as an UNBIND 647 request. In this case, applying DELETE to a Request-URI has the 648 effect of removing the binding identified by the final segment of the 649 Request-URI from the collection identified by the Request-URI minus 650 its final segment. Although [RFC2518] allows a DELETE to be a 651 non-atomic operation, when the DELETE operation is implemented as an 652 UNBIND, the operation is atomic. In particular, a DELETE on a 653 hierarchy of resources is simply the removal of a binding to the 654 collection identified by the Request-URI. 656 2.5 MOVE and Bindings 658 When MOVE is applied to a resource, the other bindings to that 659 resource MUST be unaffected, and if the resource being moved is a 660 collection, the bindings to any members of that collection MUST be 661 unaffected. Also, if MOVE is used with Overwrite:T to delete an 662 existing resource, the constraints specified for DELETE apply. 664 If the destination collection of a MOVE request supports the REBIND 665 method (see Section 6), a MOVE of a resource into that collection MAY 666 be implemented as a REBIND request. Although [RFC2518] allows a MOVE 667 to be a non-atomic operation, when the MOVE operation is implemented 668 as a REBIND, the operation is atomic. In particular, applying a MOVE 669 to a Request-URI and a Destination URI has the effect of removing a 670 binding to a resource (at the Request-URI), and creating a new 671 binding to that resource (at the Destination URI). Even when the 672 Request-URI identifies a collection, the MOVE operation involves only 673 removing one binding to that collection and adding another. 675 As an example, suppose that a MOVE is issued to URI-3 for resource R 676 below (which is also mapped to URI-1 and URI-2), with the Destination 677 header set to URI-X. After successful completion of the MOVE 678 operation, a new binding has been created which creates the URI 679 mapping between URI-X and resource R. The binding corresponding to 680 the final segment of URI-3 has been removed, which also causes the 681 URI mapping between URI-3 and R to be removed. If resource R were a 682 collection, old URI-3 based mappings to members of R would have been 683 removed, and new URI-X based mappings to members of R would have been 684 created. 686 >> Before Request: 688 URI-1 URI-2 URI-3 689 | | | 690 | | | <---- URI Mappings 691 | | | 692 +---------------------+ 693 | Resource R | 694 +---------------------+ 696 >> After Request: 698 URI-1 URI-2 URI-X 699 | | | 700 | | | <---- URI Mappings 701 | | | 702 +---------------------+ 703 | Resource R | 704 +---------------------+ 706 2.6 Determining Whether Two Bindings Are to the Same Resource 708 It is useful to have some way of determining whether two bindings are 709 to the same resource. Two resources might have identical contents 710 and properties, but not be the same resource (e.g. an update to one 711 resource does not affect the other resource). 713 The REQUIRED DAV:resource-id property defined in Section 3.1 is a 714 resource identifier, which MUST be unique across all resources for 715 all time. If the values of DAV:resource-id returned by PROPFIND 716 requests through two bindings are identical character by character, 717 the client can be assured that the two bindings are to the same 718 resource. 720 The DAV:resource-id property is created, and its value assigned, when 721 the resource is created. The value of DAV:resource-id MUST NOT be 722 changed. Even after the resource is no longer accessible through any 723 URI, that value MUST NOT be reassigned to another resource's 724 DAV:resource-id property. 726 Any method that creates a new resource MUST assign a new, unique 727 value to its DAV:resource-id property. For example, a PUT applied to 728 a null resource, COPY (when not overwriting an existing target) and 729 CHECKIN (see [RFC3253], section 4.4) must assign a new, unique value 730 to the DAV:resource-id property of the new resource they create. 732 On the other hand, any method that affects an existing resource must 733 not change the value of its DAV:resource-id property. Specifically, 734 a PUT or a COPY that updates an existing resource must not change the 735 value of its DAV:resource-id property. A REBIND, since it does not 736 create a new resource, but only changes the location of an existing 737 resource, must not change the value of the DAV:resource-id property. 739 2.7 Discovering the Bindings to a Resource 741 An OPTIONAL DAV:parent-set property on a resource provides a list of 742 the bindings that associate a collection and a URI segment with that 743 resource. If the DAV:parent-set property exists on a given resource, 744 it MUST contain a complete list of all bindings to that resource that 745 the client is authorized to see. When deciding whether to support 746 the DAV:parent-set property, server implementers / administrators 747 should balance the benefits it provides against the cost of 748 maintaining the property and the security risks enumerated in 749 Sections 9.4 and 9.5. 751 3. Properties 753 The bind feature introduces the following properties for a resource. 755 A DAV:allprop PROPFIND request SHOULD NOT return any of the 756 properties defined by this document. This allows a binding server to 757 perform efficiently when a naive client, which does not understand 758 the cost of asking a server to compute all possible live properties, 759 issues a DAV:allprop PROPFIND request. 761 3.1 DAV:resource-id Property 763 The DAV:resource-id property is a REQUIRED property that enables 764 clients to determine whether two bindings are to the same resource. 765 The value of DAV:resource-id is a URI, and may use any registered URI 766 scheme that guarantees the uniqueness of the value across all 767 resources for all time (e.g. the opaquelocktoken: scheme defined in 768 [RFC2518]). 770 772 3.2 DAV:parent-set Property 774 The DAV:parent-set property is an OPTIONAL property that enables 775 clients to discover what collections contain a binding to this 776 resource (i.e. what collections have that resource as an internal 777 member). It contains an of href/segment pair for each collection 778 that has a binding to the resource. The href identifies the 779 collection, and the segment identifies the binding name of that 780 resource in that collection. 782 A given collection MUST appear only once in the DAV:parent-set for 783 any given binding, even if there are multiple URI mappings to that 784 collection. 786 787 788 789 792 3.2.1 Example for DAV:parent-set property 794 For example, if collection C1 is mapped to both /CollX and /CollY, 795 and C1 contains a binding named "x.gif" to a resource R1, then either 796 [/CollX, x.gif] or [/CollY, x.gif] can appear in the DAV:parent-set 797 of R1, but not both. But if C1 also had a binding named "y.gif" to 798 R1, then there would be two entries for C1 in the DAV:binding-set of 799 R1 (i.e. both [/CollX, x.gif] and [/CollX, y.gif] or, alternatively, 800 both [/CollY, x.gif] and [/CollY, y.gif]). 802 +-------------------------+ 803 | Root Collection | 804 | bindings: | 805 | CollX CollY | 806 +-------------------------+ 807 | / 808 | / 809 | / 810 +-----------------+ 811 | Collection C1 | 812 | bindings: | 813 | x.gif y.gif | 814 +-----------------+ 815 | | 816 | | 817 | | 818 +--------------+ 819 | Resource R1 | 820 +--------------+ 822 In this case, one possible value for DAV:parent-set property on 823 "/CollX/x.gif" would be: 825 826 827 /CollX 828 x.gif 829 830 831 /CollX 832 y.gif 833 834 836 4. BIND Method 838 The BIND method modifies the collection identified by the 839 Request-URI, by adding a new binding from the segment specified in 840 the BIND body to the resource identified in the BIND body. 842 If a server cannot guarantee the integrity of the binding, the BIND 843 request MUST fail. Note that it is especially difficult to maintain 844 the integrity of cross-server bindings. Unless the server where the 845 resource resides knows about all bindings on all servers to that 846 resource, it may unwittingly destroy the resource or make it 847 inaccessible without notifying another server that manages a binding 848 to the resource. For example, if server A permits creation of a 849 binding to a resource on server B, server A must notify server B 850 about its binding and must have an agreement with B that B will not 851 destroy the resource while A's binding exists. Otherwise server B 852 may receive a DELETE request that it thinks removes the last binding 853 to the resource and destroy the resource while A's binding still 854 exists. The precondition DAV:cross-server-binding is defined below 855 for cases where servers fail cross-server BIND requests because they 856 cannot guarantee the integrity of cross-server bindings. 858 By default, if there already is a binding for the specified segment 859 in the collection, the new binding replaces the existing binding. 860 This default binding replacement behavior can be overridden using the 861 Overwrite header defined in Section 9.6 of [RFC2518]. 863 If a BIND request fails, the server state preceding the request MUST 864 be restored. This method is unsafe and idempotent (see [RFC2616], 865 section 9.1). 867 Marshalling: 869 The request MAY include an Overwrite header. 871 The request body MUST be a DAV:bind XML element. 873 875 If the request succeeds, the server MUST return 201 (Created) when 876 a new binding was created and 200 (OK) when an existing binding 877 was replaced. 879 If a response body for a successful request is included, it MUST 880 be a DAV:bind-response XML element. Note that this document does 881 not define any elements for the BIND response body, but the 882 DAV:bind-response element is defined to ensure interoperability 883 between future extensions that do define elements for the BIND 884 response body. 886 888 Preconditions: 890 (DAV:bind-into-collection): The Request-URI MUST identify a 891 collection. 893 (DAV:bind-source-exists): The DAV:href element MUST identify a 894 resource. 896 (DAV:binding-allowed): The resource identified by the DAV:href 897 supports multiple bindings to it. 899 (DAV:cross-server-binding): If the resource identified by the 900 DAV:href element in the request body is on another server from the 901 collection identified by the Request-URI, the server MUST support 902 cross-server bindings. 904 (DAV:name-allowed): The name specified by the DAV:segment is 905 available for use as a new binding name. 907 (DAV:can-overwrite): If the collection already contains a binding 908 with the specified path segment, and if an Overwrite header is 909 included, the value of the Overwrite header MUST be "T". 911 (DAV:cycle-allowed): If the DAV:href element identifies a 912 collection, and if the Request-URI identifies a collection that is 913 a member of that collection, the server MUST support cycles in the 914 URI namespace. 916 (DAV:locked-update-allowed): If the collection identified by the 917 Request-URI is write-locked, then the appropriate token MUST be 918 specified in an If request header. 920 (DAV:locked-overwrite-allowed): If the collection already contains 921 a binding with the specified path segment, and if that binding is 922 protected by a write-lock, then the appropriate token MUST be 923 specified in an If request header. 925 Postconditions: 927 (DAV:new-binding): The collection MUST have a binding that maps 928 the segment specified in the DAV:segment element in the request 929 body, to the resource identified by the DAV:href element in the 930 request body. 932 4.1 Example: BIND 934 >> Request: 936 BIND /CollY HTTP/1.1 937 Host: www.example.com 938 Content-Type: text/xml; charset="utf-8" 939 Content-Length: xxx 941 942 943 bar.html 944 http://www.example.com/CollX/foo.html 945 947 >> Response: 949 HTTP/1.1 201 Created 951 The server added a new binding to the collection, 952 "http://www.example.com/CollY", associating "bar.html" with the 953 resource identified by the URI 954 "http://www.example.com/CollX/foo.html". Clients can now use the URI 955 "http://www.example.com/CollY/bar.html" to submit requests to that 956 resource. 958 5. UNBIND Method 960 The UNBIND method modifies the collection identified by the 961 Request-URI, by removing the binding identified by the segment 962 specified in the UNBIND body. 964 Once a resource is unreachable by any URI mapping, the server MAY 965 reclaim system resources associated with that resource. If UNBIND 966 removes a binding to a resource, but there remain URI mappings to 967 that resource, the server MUST NOT reclaim system resources 968 associated with the resource. 970 If an UNBIND request fails, the server state preceding the request 971 MUST be restored. This method is unsafe and idempotent (see 972 [RFC2616], section 9.1). 974 Marshalling: 976 The request body MUST be a DAV:unbind XML element. 978 979 If the request succeeds, the server MUST return 200 (OK) when the 980 binding was successfully deleted. 982 If a response body for a successful request is included, it MUST 983 be a DAV:unbind-response XML element. Note that this document 984 does not define any elements for the UNBIND response body, but the 985 DAV:unbind-response element is defined to ensure interoperability 986 between future extensions that do define elements for the UNBIND 987 response body. 989 991 Preconditions: 993 (DAV:unbind-from-collection): The Request-URI MUST identify a 994 collection. 996 (DAV:unbind-source-exists): The DAV:segment element MUST identify 997 a binding in the collection identified by the Request-URI. 999 (DAV:locked-update-allowed): If the collection identified by the 1000 Request-URI is write-locked, then the appropriate token MUST be 1001 specified in the request. 1003 (DAV:protected-url-deletion-allowed): If the binding identified by 1004 the segment is protected by a write-lock, then the appropriate 1005 token MUST be specified in the request. 1007 Postconditions: 1009 (DAV:binding-deleted): The collection MUST NOT have a binding for 1010 the segment specified in the DAV:segment element in the request 1011 body. 1013 (DAV:lock-deleted): If the internal member URI of the binding 1014 specified by the Request-URI and the DAV:segment element in the 1015 request body was protected by a write-lock at the time of the 1016 request, that write-lock must have been deleted by the request. 1018 5.1 Example: UNBIND 1020 >> Request: 1022 UNBIND /CollX HTTP/1.1 1023 Host: www.example.com 1024 Content-Type: text/xml; charset="utf-8" 1025 Content-Length: xxx 1027 1028 1029 foo.html 1030 1032 >> Response: 1034 HTTP/1.1 200 OK 1036 The server removed the binding named "foo.html" from the collection, 1037 "http://www.example.com/CollX". A request to the resource named 1038 "http://www.example.com/CollX/foo.html" will return a 404 (Not Found) 1039 response. 1041 6. REBIND Method 1043 The REBIND method removes a binding to a resource from a collection, 1044 and adds a binding to that resource into the collection identified by 1045 the Request-URI. The request body specifies the binding to be added 1046 (segment) and the old binding to be removed (href). It is 1047 effectively an atomic form of a MOVE request, and MUST be treated the 1048 same way as MOVE for the purpose of determining access permissions. 1050 If a REBIND request fails, the server state preceding the request 1051 MUST be restored. This method is unsafe and idempotent (see 1052 [RFC2616], section 9.1). 1054 Marshalling: 1056 The request MAY include an Overwrite header. 1058 The request body MUST be a DAV:rebind XML element. 1060 1062 If the request succeeds, the server MUST return 201 (Created) when 1063 a new binding was created and 200 (OK) when an existing binding 1064 was replaced. 1066 If a response body for a successful request is included, it MUST 1067 be a DAV:rebind-response XML element. Note that this document 1068 does not define any elements for the REBIND response body, but the 1069 DAV:rebind-response element is defined to ensure interoperability 1070 between future extensions that do define elements for the REBIND 1071 response body. 1073 1075 Preconditions: 1077 (DAV:rebind-into-collection): The Request-URI MUST identify a 1078 collection. 1080 (DAV:rebind-source-exists): The DAV:href element MUST identify a 1081 resource. 1083 (DAV:cross-server-binding): If the resource identified by the 1084 DAV:href element in the request body is on another server from the 1085 collection identified by the Request-URI, the server MUST support 1086 cross-server bindings. 1088 (DAV:name-allowed): The name specified by the DAV:segment is 1089 available for use as a new binding name. 1091 (DAV:can-overwrite): If the collection already contains a binding 1092 with the specified path segment, and if an Overwrite header is 1093 included, the value of the Overwrite header MUST be "T". 1095 (DAV:cycle-allowed): If the DAV:href element identifies a 1096 collection, and if the Request-URI identifies a collection that is 1097 a member of that collection, the server MUST support cycles in the 1098 URI namespace. 1100 (DAV:locked-update-allowed): If the collection identified by the 1101 Request-URI is write-locked, then the appropriate token MUST be 1102 specified in the request. 1104 (DAV:protected-url-modification-allowed): If the collection 1105 identified by the Request-URI already contains a binding with the 1106 specified path segment, and if that binding is protected by a 1107 write-lock, then the appropriate token MUST be specified in the 1108 request. 1110 (DAV:locked-source-collection-update-allowed): If the collection 1111 identified by the parent collection prefix of the DAV:href URI is 1112 write-locked, then the appropriate token MUST be specified in the 1113 request. 1115 (DAV:protected-source-url-deletion-allowed): If the DAV:href URI 1116 is protected by a write lock, then the appropriate token MUST be 1117 specified in the request. 1119 Postconditions: 1121 (DAV:new-binding): The collection MUST have a binding that maps 1122 the segment specified in the DAV:segment element in the request 1123 body, to the resource that was identified by the DAV:href element 1124 in the request body. 1126 (DAV:binding-deleted): The URL specified in the DAV:href element 1127 in the request body MUST NOT be mapped to a resource. 1129 (DAV:lock-deleted): If the URL specified in the DAV:href element 1130 in the request body was protected by a write-lock at the time of 1131 the request, that write-lock must have been deleted by the 1132 request. 1134 6.1 Example: REBIND 1136 >> Request: 1138 REBIND /CollX HTTP/1.1 1139 Host: www.example.com 1140 Content-Type: text/xml; charset="utf-8" 1141 Content-Length: xxx 1143 1144 1145 foo.html 1146 http://www.example.com/CollY/bar.html 1147 1149 >> Response: 1151 HTTP/1.1 200 OK 1153 The server added a new binding to the collection, 1154 "http://www.example.com/CollX", associating "foo.html" with the 1155 resource identified by the URI 1156 "http://www.example.com/CollY/bar.html", and removes the binding 1157 named "bar.html" from the collection identified by the URI 1158 "http://www.example.com/CollY". Clients can now use the URI 1159 "http://www.example.com/CollX/foo.html" to submit requests to that 1160 resource, and requests on the URI 1161 "http://www.example.com/CollY/bar.html" will fail with a 404 (Not 1162 Found) response. 1164 7. Additional Status Codes 1166 7.1 208 Already Reported 1168 The 208 (Already Reported) status code can be used inside a 1169 DAV:propstat response element to avoid enumerating the internal 1170 members of multiple bindings to the same collection repeatedly. For 1171 each binding to a collection inside the request's scope, only one 1172 will be reported with a 200 status, while subsequent DAV:response 1173 elements for all other bindings will use the 208 status, and no 1174 DAV:response elements for their descendants are included. 1176 Note that the 208 status will only occur for "Depth: infinity" 1177 requests, and that it is of particular importance when the multiple 1178 collection bindings cause a bind loop as discussed in Section 2.2. 1180 A client can request the DAV:resourceid property in a PROPFIND 1181 request to guarantee that they can accurately reconstruct the binding 1182 structure of a collection with multiple bindings to a single 1183 resource. 1185 For backward compatibility with clients not aware of the 208 status 1186 code appearing in multistatus response bodies, it SHOULD NOT be used 1187 unless the client has signalled support for this specification using 1188 the "DAV" request header (see Section 8.2). Instead, a 506 status 1189 should be returned when a binding loop is discovered. This allows 1190 the server to return the 506 as the top level return status, if it 1191 discovers it before it started the response, or in the middle of a 1192 multistatus, if it discovers it in the middle of streaming out a 1193 multistatus response. 1195 7.1.1 Example: PROPFIND by bind-aware client 1197 For example, consider a PROPFIND request on /Coll (bound to 1198 collection C), where the members of /Coll are /Coll/Foo (bound to 1199 resource R) and /Coll/Bar (bound to collection C). 1201 >> Request: 1203 PROPFIND /Coll/ HTTP/1.1 1204 Host: www.example.com 1205 Depth: infinity 1206 DAV: bind 1207 Content-Type: text/xml; charset="utf-8" 1208 Content-Length: xxx 1210 1211 1212 1213 1214 1215 1216 1218 >> Response: 1220 HTTP/1.1 207 Multi-Status 1221 Content-Type: text/xml; charset="utf-8" 1222 Content-Length: xxx 1224 1225 1226 1227 http://www.example.com/Coll/ 1228 1229 1230 Loop Demo 1231 1232 opaquelocktoken:f81d4fae-7dec-11d0-a765-00a0c91e6bf8 1234 1235 1236 HTTP/1.1 200 OK 1237 1238 1239 1240 http://www.example.com/Coll/Foo 1241 1242 1243 Bird Inventory 1244 1245 opaquelocktoken:f81d4fae-7dec-11d0-a765-00a0c91e6bf9 1247 1248 1249 HTTP/1.1 200 OK 1250 1251 1252 1253 http://www.example.com/Coll/Bar 1254 1255 1256 Loop Demo 1257 1258 opaquelocktoken:f81d4fae-7dec-11d0-a765-00a0c91e6bf8 1260 1261 1262 HTTP/1.1 208 Already Reported 1263 1264 1265 1267 7.1.2 Example: PROPFIND by non-bind-aware client 1269 In this example, the client isn't aware of the 208 status code 1270 introduced by this specification. As the "Depth: infinity" PROPFIND 1271 request would cause a loop condition, the whole request is rejected 1272 with a 506 status. 1274 >> Request: 1276 PROPFIND /Coll/ HTTP/1.1 1277 Host: www.example.com 1278 Depth: infinity 1279 Content-Type: text/xml; charset="utf-8" 1280 Content-Length: xxx 1282 1283 1284 1285 1287 >> Response: 1289 HTTP/1.1 506 Loop Detected 1291 7.2 506 Loop Detected 1293 The 506 (Loop Detected) status code indicates that the server 1294 terminated an operation because it encountered an infinite loop while 1295 processing a request with "Depth: infinity". This status indicates 1296 that the entire operation failed. 1298 8. Capability discovery 1300 8.1 OPTIONS method 1302 If the server supports bindings, it MUST return the compliance class 1303 name "bind" as a field in the "DAV" response header (see [RFC2518], 1304 section 9.1) from an OPTIONS request on any resource implemented by 1305 that server. A value of "bind" in the "DAV" header MUST indicate 1306 that the server supports all MUST level requirements and REQUIRED 1307 features specified in this document. 1309 8.2 'DAV' request header 1311 8.2.1 Generic syntax 1313 This specification introduces the 'DAV' request header that allows 1314 clients to signal compliance to specific WebDAV features. It has the 1315 same syntax as the response header defined in [RFC2518], section 9.1, 1316 but MAY be used with any method. 1318 Note that clients MUST NOT submit a specific compliance class name in 1319 the request header unless the specification defining this compliance 1320 class specifically defines its semantics for clients. 1322 Note that if a server chooses to vary the result of a request based 1323 on values in the "DAV" header, the response either MUST NOT be 1324 cacheable or the server MUST mark the response accordingly using the 1325 "Vary" header (see [RFC2616], section 14.44). 1327 8.2.2 Client compliance class 'bind' 1329 Clients SHOULD signal support for all MUST level requirements and 1330 REQUIRED features by submitting a "DAV" request header containing the 1331 compliance class name "bind". In particular, the client MUST 1332 understand the 208 status code defined in Section 7.1. 1334 9. Security Considerations 1336 This section is provided to make WebDAV implementors aware of the 1337 security implications of this protocol. 1339 All of the security considerations of HTTP/1.1 and the WebDAV 1340 Distributed Authoring Protocol specification also apply to this 1341 protocol specification. In addition, bindings introduce several new 1342 security concerns and increase the risk of some existing threats. 1344 These issues are detailed below. 1346 9.1 Privacy Concerns 1348 In a context where cross-server bindings are supported, creating 1349 bindings on a trusted server may make it possible for a hostile agent 1350 to induce users to send private information to a target on a 1351 different server. 1353 9.2 Bind Loops 1355 Although bind loops were already possible in HTTP 1.1, the 1356 introduction of the BIND method creates a new avenue for clients to 1357 create loops accidentally or maliciously. If the binding and its 1358 target are on the same server, the server may be able to detect BIND 1359 requests that would create loops. Servers are required to detect 1360 loops that are caused by bindings to collections during the 1361 processing of any requests with "Depth: infinity". 1363 9.3 Bindings, and Denial of Service 1365 Denial of service attacks were already possible by posting URIs that 1366 were intended for limited use at heavily used Web sites. The 1367 introduction of BIND creates a new avenue for similar denial of 1368 service attacks. If cross-server bindings are supported, clients can 1369 now create bindings at heavily used sites to target locations that 1370 were not designed for heavy usage. 1372 9.4 Private Locations May Be Revealed 1374 If the DAV:parent-set property is maintained on a resource, the 1375 owners of the bindings risk revealing private locations. The 1376 directory structures where bindings are located are available to 1377 anyone who has access to the DAV:parent-set property on the resource. 1378 Moving a binding may reveal its new location to anyone with access to 1379 DAV:parent-set on its resource. 1381 9.5 DAV:parent-set and Denial of Service 1383 If the server maintains the DAV:parent-set property in response to 1384 bindings created in other administrative domains, it is exposed to 1385 hostile attempts to make it devote resources to adding bindings to 1386 the list. 1388 10. Internationalization Considerations 1390 All internationalization considerations mentioned in [RFC2518] also 1391 apply to this document. 1393 11. IANA Considerations 1395 All IANA considerations mentioned in [RFC2518] also apply to this 1396 document. 1398 12. Acknowledgements 1400 This document is the collaborative product of the authors and Tyson 1401 Chihaya, Jim Davis, Chuck Fay and Judith Slein. This draft has 1402 benefited from thoughtful discussion by Jim Amsden, Peter Carlson, 1403 Steve Carter, Ken Coar, Ellis Cohen, Dan Connolly, Bruce Cragun, 1404 Spencer Dawkins, Mark Day, Rajiv Dulepet, David Durand, Lisa 1405 Dusseault, Stefan Eissing, Roy Fielding, Yaron Goland, Joe 1406 Hildebrand, Fred Hitt, Alex Hopmann, James Hunt, Marcus Jager, Chris 1407 Kaler, Manoj Kasichainula, Rohit Khare, Brian Korver, Daniel 1408 LaLiberte, Steve Martin, Larry Masinter, Jeff McAffer, Surendra 1409 Koduru Reddy, Max Rible, Sam Ruby, Bradley Sergeant, Nick Shelness, 1410 John Stracke, John Tigue, John Turner, Kevin Wiggen, and other 1411 members of the WebDAV working group. 1413 13. References 1415 13.1 Normative References 1417 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1418 Requirement Levels", BCP 14, RFC 2119, March 1997. 1420 [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S. and D. 1421 Jensen, "HTTP Extensions for Distributed Authoring -- 1422 WEBDAV", RFC 2518, February 1999. 1424 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 1425 Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext 1426 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 1428 [XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E. and 1429 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Third 1430 Edition)", W3C REC-xml-20040204, February 2004, 1431 . 1433 [draft-fielding-rfc2396bis] 1434 Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform 1435 Resource Identifier (URI): Generic Syntax", ID 1436 draft-fielding-rfc2396bis-07, September 2004. 1438 13.2 Informative References 1440 [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C. and J. 1442 Whitehead, "Versioning Extensions to WebDAV (Web 1443 Distributed Authoring and Versioning)", RFC 3253, March 1444 2002. 1446 Authors' Addresses 1448 Geoffrey Clemm 1449 IBM 1450 20 Maguire Road 1451 Lexington, MA 02421 1453 EMail: geoffrey.clemm@us.ibm.com 1455 Jason Crawford 1456 IBM Research 1457 P.O. Box 704 1458 Yorktown Heights, NY 10598 1460 EMail: ccjason@us.ibm.com 1462 Julian F. Reschke 1463 greenbytes GmbH 1464 Salzmannstrasse 152 1465 Muenster, NW 48159 1466 Germany 1468 EMail: julian.reschke@greenbytes.de 1470 Jim Whitehead 1471 UC Santa Cruz, Dept. of Computer Science 1472 1156 High Street 1473 Santa Cruz, CA 95064 1475 EMail: ejw@cse.ucsc.edu 1477 Appendix A. Change Log (to be removed by RFC Editor before publication) 1479 A.1 Since draft-ietf-webdav-bind-02 1481 Add and resolve issues "2.3_COPY_SHARED_BINDINGS" and 1482 "2.3_MULTIPLE_COPY". Add issue "5.1_LOOP_STATUS" and proposed 1483 resolution, but keep it open. Add issues "ED_references" and 1484 "4_507_status". Started work on index. Rename document to "Binding 1485 Extensions to Web Distributed Authoring and Versioning (WebDAV)". 1487 Rename "References" to "Normative References". Close issue 1488 "ED_references". Close issue "4_507_status". 1490 A.2 Since draft-ietf-webdav-bind-03 1492 Add and close issues "9.2_redirect_loops", "ED_authors" and 1493 "ED_updates". Add section about capability discovery (DAV header). 1494 Close issues "5.1_LOOP_STATUS". Add and resolve new issue 1495 "5.1_506_STATUS_STREAMING". Update XML spec reference. Add issue 1496 "locking" and resolve as invalid. 1498 A.3 Since draft-ietf-webdav-bind-04 1500 Add and close issues "6_precondition_binding_allowed" and 1501 "6_lock_behaviour". Add mailing list and issues list pointers to 1502 front. 1504 A.4 Since draft-ietf-webdav-bind-05 1506 Editorial fixes. Add and resolve issues "1.3_error_negotiation", 1507 "2.5_language" and "7.1.1_add_resource_id". Add historical issue 1508 "4_LOCK_BEHAVIOR" and it's resolution for better tracking. 1510 A.5 Since draft-ietf-webdav-bind-06 1512 Rewrite Editorial Note. Open and resolve issues "2.6_identical", 1513 "specify_safeness_and_idempotence" and "ED_rfc2026_ref". 1515 A.6 Since draft-ietf-webdav-bind-07 1517 Add more index items (no change tracking). Add and resolve issues 1518 "2.3_copy_to_same", "bind_properties", "bind_vs_ACL", 1519 "6_rebind_intro" and "rfc2396bis" (actually an action item). Fix XML 1520 DTD fragment in section 3.3. Make spelling of "Request-URI" 1521 consistent. 1523 A.7 Since draft-ietf-webdav-bind-08 1525 Resolved editorial issues raised by Jim Whitehead in 1526 . Add and resolve issues "atomicity", "2_allow_destroy", 1528 "2.1_separate_loop_discussion", "2.1.1_bind_loops_vs_locks", 1529 "2.3_copy_depth_infinity", "2.3_copy_example", "2.3_copy_vs_loops", 1530 "2.6_resource-id_vs_versions", "3.2_example" and 1531 "6_rebind_premissions". Add issue "2.6_when_do_ids_change". Re-open 1532 and resolve "6_rebind_intro". 1534 Appendix B. Resolved issues (to be removed by RFC Editor before 1535 publication) 1537 Issues that were either rejected or resolved in this version of this 1538 document. 1540 B.1 2_allow_destroy 1542 Type: change 1544 1547 ejw@cs.ucsc.edu (2004-11-29): The language here would preclude the 1548 future definition of a DESTROY method which had the semantics of 1549 removing the state of a resource from a server, irregardless of any 1550 containment relationships that may hold it. Such a method could be 1551 quite useful for records management functionality, in order to 1552 implement a records disposition policy that specified deletion at a 1553 certain time. My recommended tweak to the language of section 2 is 1554 minor: add the following sentence to the end of the paragraph: "It is 1555 permissible, however, for future method definitions (e.g., a DESTROY 1556 method) to have semantics that remove all bindings and/or immediately 1557 reclaim system resources." 1559 Resolution (2004-11-30): Agreed to add statement about methods that 1560 explicitly have that semantics. 1562 B.2 2.1_separate_loop_discussion 1564 Type: edit 1566 1569 ejw@cs.ucsc.edu (2004-11-29): I think it would be more clear to 1570 separate out the discussion of loops and bindings, and make it a 1571 separate section (say, 2.2) This issue comes up frequently enough 1572 that it would be good to make it easy to find this issue in the TOC. 1573 Also, a mention of the Already Reported status code would be good to 1574 have here, since it also mentions 506. 1576 Resolution (2004-11-30): Agreed to move 1st paragraph into separate 1577 subsection. 1579 B.3 2.1.1_bind_loops_vs_locks 1581 Type: change 1582 1585 ejw@cs.ucsc.edu (2004-12-03): ...The other is the semantics of the 1586 lock operation in the presence of loopback bindings. I think the 1587 handling of If headers is relatively straightforward. The semantics 1588 of locking are not.... 1590 Resolution (2004-12-09): After some discussion, the working group 1591 agreed that we don't want to define special semantics for 1592 depth:infinity locks, thus the standard lock sematics apply (see 1593 http://lists.w3.org/Archives/Public/w3c-dist-auth/2004OctDec/0271.htm 1594 l). 1596 B.4 2.3_copy_depth_infinity 1598 Type: change 1600 1603 ejw@cs.ucsc.edu (2004-11-29): This section doesn't clearly address 1604 the semantics of COPY with Depth infinity. My recommendation is to 1605 add, after paragraph 3, text like this: "As specified in [RFC2518], a 1606 COPY with Depth infinity causes the collection resource to be 1607 duplicated, all of its bound children to be duplicated, and their 1608 children's bound children, and so on, to the bottom of the 1609 containment hierarchy. All of the segments of the bindings of the 1610 destination collection are the same as for the destination 1611 collection. However, the destination resource for all bindings in 1612 the destination collection are different from those of the source 1613 collection, since all resources have been duplicated, creating new 1614 resources with distinct DAV:resource-id properties." 1616 Resolution (2004-12-02): Example added. 1618 B.5 2.3_copy_vs_loops 1620 Type: change 1622 1625 ejw@cs.ucsc.edu (2004-11-29): There should also be some text 1626 addressing COPY depth infinity and loops -- in some instances during 1627 a COPY with Depth infinity, the server really wants to recreate the 1628 binding that causes the loop, rather than continuing to make 1629 duplicate resources. This is somewhat addressed by the final 1630 paragraph in Section 2.3, but not exactly. 1632 Resolution (2004-12-02): Can be closed after copy/depth:infinity 1633 example was added (see 1634 http://lists.w3.org/Archives/Public/w3c-dist-auth/2004OctDec/0181.htm 1635 l). 1637 B.6 2.3_copy_example 1639 Type: change 1641 1644 ejw@cs.ucsc.edu (2004-11-29): It might make sense to create an 1645 example covering the situation described in the final paragraph of 1646 Section 2.3. I'm not 100% sure I know what scenario this paragraph 1647 addresses, other reading the spec. for the first time would 1648 presumably have a tougher time. 1650 Resolution (2004-12-02): Example added. 1652 B.7 2.6_resource-id_vs_versions 1654 Type: change 1656 1659 ejw@cs.ucsc.edu (2004-11-29): There needs to be some discussion on 1660 the interactions of DAV:resource-id and versioning. As near as I can 1661 tell, the intent is that every revision will have a unique 1662 DAV:resource-id value. 1664 Resolution (2004-12-01): Mention in an example. 1666 B.8 3.2_example 1668 Type: change 1670 1673 ejw@cs.ucsc.edu (2004-11-29): I think it would be helpful to have an 1674 example of this property. I'd be happy to help develop such an 1675 example. 1677 Resolution (2004-11-30): Example added, including diagram. 1679 B.9 atomicity 1681 Type: change 1683 1686 ejw@cs.ucsc.edu (2004-11-29): The intent of the BIND method is for 1687 its behavior to be atomic. However, this is never actually stated 1688 explicitly in the specification. Seems like it should be. 1690 Resolution (2004-11-30): Agreed. Steal text from RFC3253 (applies to 1691 all method definitions). 1693 B.10 6_rebind_intro 1695 Type: edit 1697 1700 ejw@cs.ucsc.edu (2004-11-12): I'm reading through the BIND 1701 specification, and the description of the REBIND method's operands is 1702 a bit unclear to me. I'm assuming the intent is similar to BIND and 1703 UNBIND, each of which clearly state in the first sentence what role 1704 the Request-URI, segment, and href fields play. In my reading I just 1705 jumped right into the spec. at this method (typical reference 1706 reading pattern), and hence I didn't initially see the similarity 1707 with the BIND and UNBIND method operands. 1709 Resolution (2004-12-02): Agreed and fixed (fixed again after it was 1710 broken in -08). 1712 B.11 6_rebind_premissions 1714 Type: edit 1716 1719 ejw@cs.ucsc.edu (2004-12-03): I agree with Lisa that the access 1720 control implications of REBIND should be made explicit. My 1721 suggestion is to add the following language to Section 6. Change: 1722 "It is effectively an atomic form of a MOVE request." To: "It is 1723 effectively an atomic form of a MOVE request, and MUST be treated as 1724 a MOVE for the purpose of determining access permissions (see RFC 1725 3744, Appendix B)." 1726 Resolution (2004-12-03): Make that statement, but avoid the 1727 unnecessary normative reference to RFC3744. 1729 Appendix C. Open issues (to be removed by RFC Editor prior to 1730 publication) 1732 C.1 edit 1734 Type: edit 1736 julian.reschke@greenbytes.de (2004-05-30): Umbrella issue for 1737 editorial fixes/enhancements. 1739 C.2 2.6_when_do_ids_change 1741 Type: change 1743 1746 ejw@cs.ucsc.edu (2004-11-29): Change "must not" to "MUST NOT" (and 1747 eliminate the "For example" at the start of the sentence -- perhaps 1748 change to "Specifically," 1750 julian.reschke@greenbytes.de (2004-11-30): Fix language, replace MOVE 1751 by REBIND (because MOVE may be implemented as COPY/DELETE). Unclear 1752 whether we need more changes. 1754 Index 1756 2 1757 208 Already Reported (status code) 27 1759 5 1760 506 Loop Detected (status code) 29 1762 B 1763 BIND method 19 1764 Binding 7 1766 C 1767 Collection 7 1768 Condition Names 1769 DAV:bind-into-collection (pre) 20 1770 DAV:bind-source-exists (pre) 20 1771 DAV:binding-allowed (pre) 20 1772 DAV:binding-deleted (post) 23, 26 1773 DAV:can-overwrite (pre) 21, 25 1774 DAV:cross-server-binding (pre) 21, 25 1775 DAV:cycle-allowed (pre) 21, 25 1776 DAV:lock-deleted (post) 23, 26 1777 DAV:locked-overwrite-allowed (pre) 21 1778 DAV:locked-source-collection-update-allowed (pre) 25 1779 DAV:locked-update-allowed (pre) 21, 23, 25 1780 DAV:name-allowed (pre) 21, 25 1781 DAV:new-binding (post) 21, 26 1782 DAV:protected-source-url-deletion-allowed (pre) 26 1783 DAV:protected-url-deletion-allowed (pre) 23 1784 DAV:protected-url-modification-allowed (pre) 25 1785 DAV:rebind-from-collection (pre) 25 1786 DAV:rebind-source-exists (pre) 25 1787 DAV:unbind-from-collection (pre) 23 1788 DAV:unbind-source-exists (pre) 23 1790 D 1791 DAV header 1792 compliance class 'bind' 30 1793 DAV:bind-into-collection precondition 20 1794 DAV:bind-source-exists precondition 20 1795 DAV:binding-allowed precondition 20 1796 DAV:binding-deleted postcondition 23, 26 1797 DAV:can-overwrite precondition 21, 25 1798 DAV:cross-server-binding precondition 21, 25 1799 DAV:cycle-allowed precondition 21, 25 1800 DAV:lock-deleted postcondition 23, 26 1801 DAV:locked-overwrite-allowed precondition 21 1802 DAV:locked-source-collection-update-allowed precondition 25 1803 DAV:locked-update-allowed precondition 21, 23, 25 1804 DAV:name-allowed precondition 21, 25 1805 DAV:new-binding postcondition 21, 26 1806 DAV:parent-set property 18 1807 DAV:protected-source-url-deletion-allowed precondition 26 1808 DAV:protected-url-deletion-allowed precondition 23 1809 DAV:protected-url-modification-allowed precondition 25 1810 DAV:rebind-from-collection precondition 25 1811 DAV:rebind-source-exists precondition 25 1812 DAV:resource-id property 17 1813 DAV:unbind-from-collection precondition 23 1814 DAV:unbind-source-exists precondition 23 1816 I 1817 Internal Member URI 7 1819 M 1820 Methods 1821 BIND 19 1822 REBIND 24 1823 UNBIND 22 1825 P 1826 Path Segment 7 1827 Properties 1828 DAV:parent-set 18 1829 DAV:resource-id 17 1831 R 1832 REBIND method 24 1834 S 1835 Status Codes 1836 208 Already Reported 27 1837 506 Loop Detected 29 1839 U 1840 UNBIND method 22 1841 URI Mapping 6 1843 Intellectual Property Statement 1845 The IETF takes no position regarding the validity or scope of any 1846 Intellectual Property Rights or other rights that might be claimed to 1847 pertain to the implementation or use of the technology described in 1848 this document or the extent to which any license under such rights 1849 might or might not be available; nor does it represent that it has 1850 made any independent effort to identify any such rights. Information 1851 on the procedures with respect to rights in RFC documents can be 1852 found in BCP 78 and BCP 79. 1854 Copies of IPR disclosures made to the IETF Secretariat and any 1855 assurances of licenses to be made available, or the result of an 1856 attempt made to obtain a general license or permission for the use of 1857 such proprietary rights by implementers or users of this 1858 specification can be obtained from the IETF on-line IPR repository at 1859 http://www.ietf.org/ipr. 1861 The IETF invites any interested party to bring to its attention any 1862 copyrights, patents or patent applications, or other proprietary 1863 rights that may cover technology that may be required to implement 1864 this standard. Please address the information to the IETF at 1865 ietf-ipr@ietf.org. 1867 Disclaimer of Validity 1869 This document and the information contained herein are provided on an 1870 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 1871 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET 1872 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, 1873 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE 1874 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1875 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1877 Copyright Statement 1879 Copyright (C) The Internet Society (2004). This document is subject 1880 to the rights, licenses and restrictions contained in BCP 78, and 1881 except as set forth therein, the authors retain all their rights. 1883 Acknowledgment 1885 Funding for the RFC Editor function is currently provided by the 1886 Internet Society.