Internet Engineering Task Force (IETF) G. Clemm
Request for Comments: 5842 IBM
Category: Experimental J. Crawford
ISSN: 2070-1721 IBM Research
J. Reschke, Ed.
greenbytes
J. Whitehead
U.C. Santa Cruz
April 2010
Binding Extensions to
Web Distributed Authoring and Versioning (WebDAV)
Abstract
This specification defines bindings, and the BIND method for creating
multiple bindings to the same resource. Creating a new binding to a
resource causes at least one new URI to be mapped to that resource.
Servers are required to ensure the integrity of any bindings that
they allow to be created.
Status of This Memo
This document is not an Internet Standards Track specification; it is
published for examination, experimental implementation, and
evaluation.
This document defines an Experimental Protocol for the Internet
community. This document is a product of the Internet Engineering
Task Force (IETF). It represents the consensus of the IETF
community. It has received public review and has been approved for
publication by the Internet Engineering Steering Group (IESG). Not
all documents approved by the IESG are a candidate for any level of
Internet Standard; see Section 2 of RFC 5741.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc5842.
Clemm, et al. Experimental [Page 1]
RFC 5842 Binding Extensions to WebDAV April 2010
Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
This document may contain material from IETF Documents or IETF
Contributions published or made publicly available before November
10, 2008. The person(s) controlling the copyright in some of this
material may not have granted the IETF Trust the right to allow
modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified
outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other
than English.
Table of Contents
1. Introduction ....................................................4
1.1. Terminology ................................................5
1.2. Method Preconditions and Postconditions ....................6
2. Overview of Bindings ............................................7
2.1. Bindings to Collections ....................................7
2.1.1. Bind Loops ..........................................8
2.2. URI Mappings Created by a New Binding ......................8
2.3. COPY and Bindings ..........................................9
2.3.1. Example: COPY with "Depth: infinity" in
Presence of Bind Loops .............................11
2.3.2. Example: COPY Updating Multiple Bindings ...........13
2.3.3. Example: COPY with "Depth: infinity" with
Multiple Bindings to a Leaf Resource ...............14
2.4. DELETE and Bindings .......................................15
2.5. MOVE and Bindings .........................................15
2.5.1. Example: Simple MOVE ...............................16
2.5.2. Example: MOVE Request Causing a Bind Loop ..........16
2.6. PROPFIND and Bindings .....................................18
Clemm, et al. Experimental [Page 2]
RFC 5842 Binding Extensions to WebDAV April 2010
2.7. Determining Whether Two Bindings Are to the Same
Resource ..................................................18
2.8. Discovering the Bindings to a Resource ....................19
3. Properties .....................................................19
3.1. DAV:resource-id Property ..................................20
3.2. DAV:parent-set Property ...................................20
3.2.1. Example for DAV:parent-set Property ................20
4. BIND Method ....................................................21
4.1. Example: BIND .............................................24
5. UNBIND Method ..................................................24
5.1. Example: UNBIND ...........................................26
6. REBIND Method ..................................................26
6.1. Example: REBIND ...........................................28
6.2. Example: REBIND in Presence of Locks and Bind Loops .......29
7. Additional Status Codes ........................................31
7.1. 208 Already Reported ......................................31
7.1.1. Example: PROPFIND by Bind-Aware Client .............32
7.1.2. Example: PROPFIND by Non-Bind-Aware Client .........34
7.2. 508 Loop Detected .........................................34
8. Capability Discovery ...........................................34
8.1. OPTIONS Method ............................................34
8.2. 'DAV' Request Header ......................................34
9. Relationship to Locking in WebDAV ..............................35
9.1. Example: Locking and Multiple Bindings ....................36
10. Relationship to WebDAV Access Control Protocol ................37
11. Relationship to Versioning Extensions to WebDAV ...............37
12. Security Considerations .......................................40
12.1. Privacy Concerns .........................................40
12.2. Bind Loops ...............................................40
12.3. Bindings and Denial of Service ...........................40
12.4. Private Locations May Be Revealed ........................40
12.5. DAV:parent-set and Denial of Service .....................41
13. Internationalization Considerations ...........................41
14. IANA Considerations ...........................................41
15. Acknowledgements ..............................................41
16. References ....................................................41
16.1. Normative References .....................................41
16.2. Informative References ...................................42
Index .............................................................42
Clemm, et al. Experimental [Page 3]
RFC 5842 Binding Extensions to WebDAV April 2010
1. Introduction
This specification extends the WebDAV Distributed Authoring Protocol
([RFC4918]) to enable clients to create new access paths to existing
resources. This capability is useful for several reasons:
URIs of WebDAV-compliant resources are hierarchical and correspond to
a hierarchy of collections in resource space. The WebDAV Distributed
Authoring Protocol makes it possible to organize these resources into
hierarchies, placing them into groupings, known as collections, which
are more easily browsed and manipulated than a single flat
collection. However, hierarchies require categorization decisions
that locate resources at a single location in the hierarchy, a
drawback when a resource has multiple valid categories. For example,
in a hierarchy of vehicle descriptions containing collections for
cars and boats, a description of a combination car/boat vehicle could
belong in either collection. Ideally, the description should be
accessible from both. Allowing clients to create new URIs that
access the existing resource lets them put that resource into
multiple collections.
Hierarchies also make resource sharing more difficult, since
resources that have utility across many collections are still forced
into a single collection. For example, the mathematics department at
one university might create a collection of information on fractals
that contains bindings to some local resources but also provides
access to some resources at other universities. For many reasons, it
may be undesirable to make physical copies of the shared resources on
the local server, for example, to conserve disk space, to respect
copyright constraints, or to make any changes in the shared resources
visible automatically. Being able to create new access paths to
existing resources in other collections or even on other servers is
useful for this sort of case.
The BIND method, defined here, provides a mechanism for allowing
clients to create alternative access paths to existing WebDAV
resources. HTTP [RFC2616] and WebDAV [RFC4918] methods are able to
work because there are mappings between URIs and resources. A method
is addressed to a URI, and the server follows the mapping from that
URI to a resource, applying the method to that resource. Multiple
URIs may be mapped to the same resource, but until now, there has
been no way for clients to create additional URIs mapped to existing
resources.
BIND lets clients associate a new URI with an existing WebDAV
resource, and this URI can then be used to submit requests to the
resource. Since URIs of WebDAV resources are hierarchical, and
correspond to a hierarchy of collections in resource space, the BIND
Clemm, et al. Experimental [Page 4]
RFC 5842 Binding Extensions to WebDAV April 2010
method also has the effect of adding the resource to a collection.
As new URIs are associated with the resource, it appears in
additional collections.
A BIND request does not create a new resource, but simply makes a new
URI for submitting requests to an existing resource available. The
new URI is indistinguishable from any other URI when submitting a
request to a resource. Only one round trip is needed to submit a
request to the intended target. Servers are required to enforce the
integrity of the relationships between the new URIs and the resources
associated with them. Consequently, it may be very costly for
servers to support BIND requests that cross server boundaries.
This specification is organized as follows. Section 1.1 defines
terminology used in the rest of the specification, while Section 2
overviews bindings. Section 3 defines the new properties needed to
support multiple bindings to the same resource. Section 4 specifies
the BIND method, used to create multiple bindings to the same
resource. Section 5 specifies the UNBIND method, used to remove a
binding to a resource. Section 6 specifies the REBIND method, used
to move a binding to another collection.
1.1. Terminology
The terminology used here follows and extends that in the WebDAV
Distributed Authoring Protocol specification [RFC4918].
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].
This document uses XML DTD fragments ([XML]) as a notational
convention, using the rules defined in Section 17 of [RFC4918].
URI Mapping
A relation between an absolute URI and a resource. For an
absolute URI U and the resource it identifies R, the URI mapping
can be thought of as (U => R). Since a resource can represent
items that are not network retrievable as well as those that are,
it is possible for a resource to have zero, one, or many URI
mappings. Mapping a resource to an "http"-scheme URI makes it
possible to submit HTTP requests to the resource using the URI.
Path Segment
Informally, the characters found between slashes ("/") in a URI.
Formally, as defined in Section 3.3 of [RFC3986].
Clemm, et al. Experimental [Page 5]
RFC 5842 Binding Extensions to WebDAV April 2010
Binding
A relation between a single path segment (in a collection) and a
resource. A binding is part of the state of a collection. If two
different collections contain a binding between the same path
segment and the same resource, these are two distinct bindings.
So for a collection C, a path segment S, and a resource R, the
binding can be thought of as C:(S -> R). Bindings create URI
mappings, and hence allow requests to be sent to a single resource
from multiple locations in a URI namespace. For example, given a
collection C (accessible through the URI
http://www.example.com/CollX), a path segment S (equal to
"foo.html"), and a resource R, then creating the binding C: (S ->
R) makes it possible to use the URI
http://www.example.com/CollX/foo.html to access R.
Collection
A resource that contains, as part of its state, a set of bindings
that identify internal member resources.
Internal Member URI
The URI that identifies an internal member of a collection and
that consists of the URI for the collection, followed by a slash
character ('/'), followed by the path segment of the binding for
that internal member.
Binding Integrity
The property of a binding that says that:
* the binding continues to exist, and
* the identity of the resource identified by that binding does
not change,
unless an explicit request is executed that is defined to delete
that binding (examples of requests that delete a binding are
DELETE, MOVE, and -- defined later on -- UNBIND and REBIND).
1.2. Method Preconditions and Postconditions
See Section 16 of [RFC4918] for the definitions of "precondition" and
"postcondition".
Clemm, et al. Experimental [Page 6]
RFC 5842 Binding Extensions to WebDAV April 2010
2. Overview of Bindings
Bindings are part of the state of a collection. They define the
internal members of the collection and the names of those internal
members.
Bindings are added and removed by a variety of existing HTTP methods.
A method that creates a new resource, such as PUT, COPY, and MKCOL,
adds a binding. A method that deletes a resource, such as DELETE,
removes a binding. A method that moves a resource (e.g., MOVE) both
adds a binding (in the destination collection) and removes a binding
(in the source collection). The BIND method introduced here provides
a mechanism for adding a second binding to an existing resource.
There is no difference between an initial binding added by PUT, COPY,
or MKCOL and additional bindings added with BIND.
It would be very undesirable if one binding could be destroyed as a
side effect of operating on the resource through a different binding.
In particular, the removal of one binding to a resource (e.g., with a
DELETE or a MOVE) MUST NOT disrupt another binding to that resource,
e.g., by turning that binding into a dangling path segment. The
server MUST NOT reclaim system resources after removing one binding,
while other bindings to the resource remain. In other words, the
server MUST maintain the integrity of a binding. It is permissible,
however, for future method definitions (e.g., a DESTROY method) to
have semantics that explicitly remove all bindings and/or immediately
reclaim system resources.
Note: the collection model described herein is not compatible with
systems in which resources inherit properties based solely on the
access path, as the ability to create additional bindings will
cause a single resource to appear as member of several different
collections at the same time.
2.1. Bindings to Collections
Creating a new binding to a collection makes each resource associated
with a binding in that collection accessible via a new URI, and thus
creates new URI mappings to those resources but no new bindings.
For example, suppose a new binding CollY is created for collection C1
in the figure below. It immediately becomes possible to access
resource R1 using the URI /CollY/x.gif and to access resource R2
using the URI /CollY/y.jpg, but no new bindings for these child
resources were created. This is because bindings are part of the
state of a collection, and they associate a URI that is relative to
Clemm, et al. Experimental [Page 7]
RFC 5842 Binding Extensions to WebDAV April 2010
that collection with its target resource. No change to the bindings
in Collection C1 is needed to make its children accessible using
/CollY/x.gif and /CollY/y.jpg.
+-------------------------+
| Root Collection |
| bindings: |
| CollX CollY |
+-------------------------+
| /
| /
| /
+------------------+
| Collection C1 |
| bindings: |
| x.gif y.jpg |
+------------------+
| \
| \
| \
+-------------+ +-------------+
| Resource R1 | | Resource R2 |
+-------------+ +-------------+
2.1.1. Bind Loops
Bindings to collections can result in loops ("cycles"), which servers
MUST detect when processing "Depth: infinity" requests. It is
sometimes possible to complete an operation in spite of the presence
of a loop. For instance, a PROPFIND can still succeed if the server
uses the new status code 208 (Already Reported) defined in
Section 7.1.
However, the 508 (Loop Detected) status code is defined in
Section 7.2 for use in contexts where an operation is terminated
because a loop was encountered.
Support for loops is OPTIONAL: servers MAY reject requests that would
lead to the creation of a bind loop (see DAV:cycle-allowed
precondition defined in Section 4).
2.2. URI Mappings Created by a New Binding
Suppose a binding from "Binding-Name" to resource R is to be added to
a collection, C. Then if C-MAP is the set of URIs that were mapped
to C before the BIND request, then for each URI "C-URI" in C-MAP, the
URI "C-URI/Binding-Name" is mapped to resource R following the BIND
request.
Clemm, et al. Experimental [Page 8]
RFC 5842 Binding Extensions to WebDAV April 2010
For example, if a binding from "foo.html" to R is added to a
collection C, and if the following URIs are mapped to C:
http://www.example.com/A/1/
http://example.com/A/one/
then the following new mappings to R are introduced:
http://www.example.com/A/1/foo.html
http://example.com/A/one/foo.html
Note that if R is a collection, additional URI mappings are created
to the descendents of R. Also, note that if a binding is made in
collection C to C itself (or to a parent of C), an infinite number of
mappings are introduced.
For example, if a binding from "myself" to C is then added to C, the
following infinite number of additional mappings to C are introduced:
http://www.example.com/A/1/myself
http://www.example.com/A/1/myself/myself
...
and the following infinite number of additional mappings to R are
introduced:
http://www.example.com/A/1/myself/foo.html
http://www.example.com/A/1/myself/myself/foo.html
...
2.3. COPY and Bindings
As defined in Section 9.8 of [RFC4918], COPY causes the resource
identified by the Request-URI to be duplicated and makes the new
resource accessible using the URI specified in the Destination
header. Upon successful completion of a COPY, a new binding is
created between the last path segment of the Destination header and
the destination resource. The new binding is added to its parent
collection, identified by the Destination header minus its final
segment.
Clemm, et al. Experimental [Page 9]
RFC 5842 Binding Extensions to WebDAV April 2010
The following figure shows an example: suppose that a COPY is issued
to URI-3 for resource R (which is also mapped to URI-1 and URI-2),
with the Destination header set to URI-X. After successful
completion of the COPY operation, resource R is duplicated to create
resource R', and a new binding has been created that creates at least
the URI mapping between URI-X and the new resource (although other
URI mappings may also have been created).
URI-1 URI-2 URI-3 URI-X
| | | |
| | | <---- URI Mappings ----> |
| | | |
+---------------------+ +------------------------+
| Resource R | | Resource R' |
+---------------------+ +------------------------+
It might be thought that a COPY request with "Depth: 0" on a
collection would duplicate its bindings, since bindings are part of
the collection's state. This is not the case, however. The
definition of Depth in [RFC4918] makes it clear that a "Depth: 0"
request does not apply to a collection's members. Consequently, a
COPY with "Depth: 0" does not duplicate the bindings contained by the
collection.
If a COPY request causes an existing resource to be updated, the
bindings to that resource MUST be unaffected by the COPY request.
Using the preceding example, suppose that a COPY request is issued to
URI-X for resource R', with the Destination header set to URI-2. The
content and dead properties of resource R would be updated to be a
copy of those of resource R', but the mappings from URI-1, URI-2, and
URI-3 to resource R remain unaffected. If, because of multiple
bindings to a resource, more than one source resource updates a
single destination resource, the order of the updates is server
defined (see Section 2.3.2 for an example).
If a COPY request would cause a new resource to be created as a copy
of an existing resource, and that COPY request has already created a
copy of that existing resource, the COPY request instead creates
another binding to the previous copy, instead of creating a new
resource (see Section 2.3.3 for an example).
Clemm, et al. Experimental [Page 10]
RFC 5842 Binding Extensions to WebDAV April 2010
2.3.1. Example: COPY with "Depth: infinity" in Presence of Bind Loops
As an example of how COPY with "Depth: infinity" would work in the
presence of bindings, consider the following collection:
+------------------+
| Root Collection |
| bindings: |
| CollX |
+------------------+
|
|
+-------------------------------+
| Collection C1 |<-------+
| bindings: | |
| x.gif CollY | |
+-------------------------------+ |
| \ (creates loop) |
| \ |
+-------------+ +------------------+ |
| Resource R1 | | Collection C2 | |
+-------------+ | bindings: | |
| y.gif CollZ | |
+------------------+ |
| | |
| +--------+
|
+-------------+
| Resource R2 |
+-------------+
If a COPY request with "Depth: infinity" is submitted to /CollX, with
a destination of /CollA, the outcome of the copy operation is that a
copy of the tree is replicated to the target /CollA:
Clemm, et al. Experimental [Page 11]
RFC 5842 Binding Extensions to WebDAV April 2010
+------------------+
| Root Collection |
| bindings: |
| CollX CollA |
+------------------+
| |
| +---------------------------+
| |
+-------------------+ |
| Collection C1 |<------------------+ |
| bindings: | | |
| x.gif CollY | | |
+-------------------+ | |
| \ (creates loop) | |
| \ | |
+-------------+ +-----------------+ | |
| Resource R1 | | Collection C2 | | |
+-------------+ | bindings: | | |
| y.gif CollZ | | |
+-----------------+ | |
| | | |
| +-------+ |
| |
+-------------+ |
| Resource R2 | |
+-------------+ |
|
+-------------------------------+
|
+-------------------+
| Collection C3 |<------------------+
| bindings: | |
| x.gif CollY | |
+-------------------+ |
| \ (creates loop) |
| \ |
+-------------+ +-----------------+ |
| Resource R3 | | Collection C4 | |
+-------------+ | bindings: | |
| y.gif CollZ | |
+-----------------+ |
| | |
| +-------+
|
+-------------+
| Resource R4 |
+-------------+
Clemm, et al. Experimental [Page 12]
RFC 5842 Binding Extensions to WebDAV April 2010
Note that the same would apply for more complex loops.
2.3.2. Example: COPY Updating Multiple Bindings
Given the following collection hierarchy:
+------------------+
| Root Collection |
| bindings: |
| CollX CollY |
+------------------+
/ \
/ \
/ \
+--------------------------+ +-----------------+
| Collection C1 | | Collection C2 |
| bindings: | | bindings: |
| x.gif y.gif | | x.gif y.gif |
+--------------------------+ +-----------------+
| | | |
| | | |
+-------------+ +-------------+ +-------------+
| Resource R1 | | Resource R2 | | Resource R3 |
+-------------+ +-------------+ +-------------+
A COPY of /CollX with "Depth: infinity" to /CollY will not result in
a changed hierarchy, and Resource R3 will be updated with the content
of either Resource R1 or Resource R2.
Clemm, et al. Experimental [Page 13]
RFC 5842 Binding Extensions to WebDAV April 2010
2.3.3. Example: COPY with "Depth: infinity" with Multiple Bindings to a
Leaf Resource
Given the following collection hierarchy:
+------------------+
| Root Collection |
| bindings: |
| CollX |
+------------------+
|
|
|
+----------------+
| Collection C1 |
| bindings: |
| x.gif y.gif |
+----------------+
| |
| |
+-------------+
| Resource R1 |
+-------------+
A COPY of /CollX with "Depth: infinity" to /CollY results in the
following collection hierarchy:
+------------------+
| Root Collection |
| bindings: |
| CollX CollY |
+------------------+
| \
| \
| \
+----------------+ +-----------------+
| Collection C1 | | Collection C2 |
| bindings: | | bindings: |
| x.gif y.gif | | x.gif y.gif |
+----------------+ +-----------------+
| | | |
| | | |
+-------------+ +-------------+
| Resource R1 | | Resource R2 |
+-------------+ +-------------+
Clemm, et al. Experimental [Page 14]
RFC 5842 Binding Extensions to WebDAV April 2010
2.4. DELETE and Bindings
When there are multiple bindings to a resource, a DELETE applied to
that resource MUST NOT remove any bindings to that resource other
than the one identified by the Request-URI. For example, suppose the
collection identified by the URI "/a" has a binding named "x" to a
resource R, and another collection identified by "/b" has a binding
named "y" to the same resource R. Then, a DELETE applied to "/a/x"
removes the binding named "x" from "/a" but MUST NOT remove the
binding named "y" from "/b" (i.e., after the DELETE, "/y/b" continues
to identify the resource R).
When DELETE is applied to a collection, it MUST NOT modify the
membership of any other collection that is not itself a member of the
collection being deleted. For example, if both "/a/.../x" and
"/b/.../y" identify the same collection, C, then applying DELETE to
"/a" must not delete an internal member from C or from any other
collection that is a member of C, because that would modify the
membership of "/b".
If a collection supports the UNBIND method (see Section 5), a DELETE
of an internal member of a collection MAY be implemented as an UNBIND
request. In this case, applying DELETE to a Request-URI has the
effect of removing the binding identified by the final segment of the
Request-URI from the collection identified by the Request-URI minus
its final segment. Although [RFC4918] allows a DELETE to be a non-
atomic operation, when the DELETE operation is implemented as an
UNBIND, the operation is atomic. In particular, a DELETE on a
hierarchy of resources is simply the removal of a binding to the
collection identified by the Request-URI.
2.5. MOVE and Bindings
When MOVE is applied to a resource, the other bindings to that
resource MUST be unaffected; and if the resource being moved is a
collection, the bindings to any members of that collection MUST be
unaffected. Also, if MOVE is used with Overwrite:T to delete an
existing resource, the constraints specified for DELETE apply.
If the destination collection of a MOVE request supports the REBIND
method (see Section 6), a MOVE of a resource into that collection MAY
be implemented as a REBIND request. Although [RFC4918] allows a MOVE
to be a non-atomic operation, when the MOVE operation is implemented
as a REBIND, the operation is atomic. In particular, applying a MOVE
to a Request-URI and a Destination URI has the effect of removing a
binding to a resource (at the Request-URI) and creating a new binding
Clemm, et al. Experimental [Page 15]
RFC 5842 Binding Extensions to WebDAV April 2010
to that resource (at the Destination URI). Even when the Request-URI
identifies a collection, the MOVE operation involves only removing
one binding to that collection and adding another.
2.5.1. Example: Simple MOVE
As an example, suppose that a MOVE is issued to URI-3 for resource R
below (which is also mapped to URI-1 and URI-2), with the Destination
header set to URI-X. After successful completion of the MOVE
operation, a new binding has been created that creates the URI
mapping between URI-X and resource R. The binding corresponding to
the final segment of URI-3 has been removed, which also causes the
URI mapping between URI-3 and R to be removed. If resource R were a
collection, old URI-3-based mappings to members of R would have been
removed, and new URI-X-based mappings to members of R would have been
created.
>> Before Request:
URI-1 URI-2 URI-3
| | |
| | | <---- URI Mappings
| | |
+---------------------+
| Resource R |
+---------------------+
>> After Request:
URI-1 URI-2 URI-X
| | |
| | | <---- URI Mappings
| | |
+---------------------+
| Resource R |
+---------------------+
2.5.2. Example: MOVE Request Causing a Bind Loop
Note that in the presence of collection bindings, a MOVE request can
cause the creation of a bind loop.
Clemm, et al. Experimental [Page 16]
RFC 5842 Binding Extensions to WebDAV April 2010
Consider the top-level collections C1 and C2 with URIs "/CollW/" and
"/CollX/". C1 also contains an additional binding named "CollY" to
C2:
+------------------+
| Root Collection |
| bindings: |
| CollW CollX |
+------------------+
| |
| |
+------------------+ |
| Collection C1 | |
| bindings: | |
| CollY | |
+------------------+ |
| |
| |
+------------------+
| Collection C2 |
| |
| |
+------------------+
In this case, the MOVE request below would cause a bind loop:
>> Request:
MOVE /CollW HTTP/1.1
Host: example.com
Destination: /CollX/CollZ
Clemm, et al. Experimental [Page 17]
RFC 5842 Binding Extensions to WebDAV April 2010
If the request succeeded, the resulting state would be:
+------------------+
| Root Collection |
| bindings: |
| CollX |
+------------------+
|
|
+------------------+ |
| Collection C1 | |
+----> | bindings: | |
| | CollY | |
| +------------------+ |
| | |
| | |
| +------------------+
| | Collection C2 |
| | bindings: |
| | CollZ |
| +------------------+
| |
| |
+-------------------+
2.6. PROPFIND and Bindings
Consistent with [RFC4918], the value of a dead property MUST be
independent of the number of bindings to its host resource or of the
path submitted to PROPFIND. On the other hand, the behavior for each
live property depends on its individual definition (for example, see
[RFC3744], Section 5, Paragraph 2 for a case where the value is
independent of its path and bindings, and [RFC4918], Section 8.8 for
a discussion about the live properties DAV:getetag and DAV:
getlastmodified, which may behave differently).
2.7. Determining Whether Two Bindings Are to the Same Resource
It is useful to have some way of determining whether two bindings are
to the same resource. Two resources might have identical contents
and properties, but not be the same resource (e.g., an update to one
resource does not affect the other resource).
The REQUIRED DAV:resource-id property defined in Section 3.1 is a
resource identifier, which MUST be unique across all resources for
all time. If the values of DAV:resource-id returned by PROPFIND
Clemm, et al. Experimental [Page 18]
RFC 5842 Binding Extensions to WebDAV April 2010
requests through two bindings are identical character by character,
the client can be assured that the two bindings are to the same
resource.
The DAV:resource-id property is created, and its value assigned, when
the resource is created. The value of DAV:resource-id MUST NOT be
changed. Even after the resource is no longer accessible through any
URI, that value MUST NOT be reassigned to another resource's DAV:
resource-id property.
Any method that creates a new resource MUST assign a new, unique
value to its DAV:resource-id property. For example, a PUT applied to
a null resource, COPY (when not overwriting an existing target) and
CHECKIN (see [RFC3253], Section 4.4) must assign a new, unique value
to the DAV:resource-id property of the new resource they create.
On the other hand, any method that affects an existing resource must
not change the value of its DAV:resource-id property. Specifically,
a PUT or a COPY that updates an existing resource must not change the
value of its DAV:resource-id property. A REBIND, since it does not
create a new resource, but only changes the location of an existing
resource, must not change the value of the DAV:resource-id property.
2.8. Discovering the Bindings to a Resource
An OPTIONAL DAV:parent-set property on a resource provides a list of
the bindings that associate a collection and a URI segment with that
resource. If the DAV:parent-set property exists on a given resource,
it MUST contain a complete list of all bindings to that resource that
the client is authorized to see. When deciding whether to support
the DAV:parent-set property, server implementers / administrators
should balance the benefits it provides against the cost of
maintaining the property and the security risks enumerated in
Sections 12.4 and 12.5.
3. Properties
The bind feature introduces the properties defined below.
A DAV:allprop PROPFIND request SHOULD NOT return any of the
properties defined by this document. This allows a binding server to
perform efficiently when a naive client, which does not understand
the cost of asking a server to compute all possible live properties,
issues a DAV:allprop PROPFIND request.
Clemm, et al. Experimental [Page 19]
RFC 5842 Binding Extensions to WebDAV April 2010
3.1. DAV:resource-id Property
The DAV:resource-id property is a REQUIRED property that enables
clients to determine whether two bindings are to the same resource.
The value of DAV:resource-id is a URI, and may use any registered URI
scheme that guarantees the uniqueness of the value across all
resources for all time (e.g., the urn:uuid: URN namespace defined in
[RFC4122] or the opaquelocktoken: URI scheme defined in [RFC4918]).
<!ELEMENT resource-id (href)>
3.2. DAV:parent-set Property
The DAV:parent-set property is an OPTIONAL property that enables
clients to discover what collections contain a binding to this
resource (i.e., what collections have that resource as an internal
member). It contains an href/segment pair for each collection that
has a binding to the resource. The href identifies the collection,
and the segment identifies the binding name of that resource in that
collection.
A given collection MUST appear only once in the DAV:parent-set for
any given binding, even if there are multiple URI mappings to that
collection.
<!ELEMENT parent-set (parent)*>
<!ELEMENT parent (href, segment)>
<!ELEMENT segment (#PCDATA)>
3.2.1. Example for DAV:parent-set Property
For example, if collection C1 is mapped to both /CollX and /CollY,
and C1 contains a binding named "x.gif" to a resource R1, then either
[/CollX, x.gif] or [/CollY, x.gif] can appear in the DAV:parent-set
of R1, but not both. But if C1 also had a binding named "y.gif" to
R1, then there would be two entries for C1 in the DAV:parent-set of
R1 (i.e., both [/CollX, x.gif] and [/CollX, y.gif] or, alternatively,
both [/CollY, x.gif] and [/CollY, y.gif]).
Clemm, et al. Experimental [Page 20]
RFC 5842 Binding Extensions to WebDAV April 2010
+-------------------------+
| Root Collection |
| bindings: |
| CollX CollY |
+-------------------------+
| /
| /
| /
+-----------------+
| Collection C1 |
| bindings: |
| x.gif y.gif |
+-----------------+
| |
| |
| |
+-------------+
| Resource R1 |
+-------------+
In this case, one possible value for the DAV:parent-set property on
"/CollX/x.gif" would be: