NoteThe ability to bind a resource to several paths is an extension to the WebDAV protocol (it may be received by web applications accessing a WebDAV server). Browsers accessing web pages will never encounter this status code.
Takeaways
- Used inside a
DAV:propstat
response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly. - For each binding to a collection inside the request's scope, only one will be reported with a
200 OK
, while subsequentDAV:response
elements for all other bindings will use the 208 status, and noDAV:response
elements for their descendants are included. - Note that the
208
status will only occur for "Depth: infinity" requests, and that it is of particular importance when the multiple collection bindings cause a bind loop. - A client can request the
DAV:resource-id
property in aPROPFIND
request to guarantee that they can accurately reconstruct the binding structure of a collection with multiple bindings to a single resource.
- For backward compatibility with clients not aware of the
208
status code appearing in multistatus response bodies, it should not be used unless the client has signalled support for this specification using theDAV
request header. - Instead, a
508 Loop Detected
status should be returned when a binding loop is discovered. This allows the server to return the508
as the top-level return status, if it discovers it before it started the response, or in the middle of a multistatus, if it discovers it in the middle of streaming out a multistatus response.
Example
HTTP/1.1 207 Multi-Status
Content-Type: application/xml; charset="utf-8"
Content-Length: 1241
<?xml version="1.0" encoding="utf-8" ?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>http://www.example.com/Coll/</D:href>
<D:propstat>
<D:prop>
<D:displayname>Loop Demo</D:displayname>
<D:resource-id>
<D:href>urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf8</D:href>
</D:resource-id>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>http://www.example.com/Coll/Foo</D:href>
<D:propstat>
<D:prop>
<D:displayname>Bird Inventory</D:displayname>
<D:resource-id>
<D:href>urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf9</D:href>
</D:resource-id>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>http://www.example.com/Coll/Bar</D:href>
<D:propstat>
<D:prop>
<D:displayname>Loop Demo</D:displayname>
<D:resource-id>
<D:href>urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf8</D:href>
</D:resource-id>
</D:prop>
<D:status>HTTP/1.1 208 Already Reported</D:status>
</D:propstat>
</D:response>
</D:multistatus>
Information
The HTTP 208 Already Reported
response code is used in a 207 Multi-Status
response to save space and avoid conflicts. If the same resource is requested several times (for example as part of a collection), with different paths, only the first one is reported with 200 OK
. Responses for all other bindings will report with this 208
status code, so no conflicts are created and the response stays shorter.