208 Already Reported: Avoiding Duplication in WebDAV Responses
multistatus body to indicate that a particular resource has already been listed earlier in the same Multi‑Status response. This prevents the server from sending duplicate information when a resource appears multiple times (e.g., in different collections). The client should refer to the first occurrence for the resource's properties.
Why 208 Exists
In WebDAV, a single PROPFIND request can ask for properties of a collection and all its members. If the same resource is a member of multiple collections being queried, it could appear multiple times in the response. The server uses 208 to say: "I've already reported this resource; please refer to the earlier entry." This reduces bandwidth and simplifies client handling.
Example Scenario
Imagine a PROPFIND on a collection that includes symbolic links or hard links pointing to the same resource. The server's response might look like:
Client Handling
When a client encounters a 208 status for a resource, it should:
- Not interpret it as an error.
- Understand that the resource's properties are the same as those reported earlier.
- Use the first occurrence's properties and not expect new data from this entry.
When Not to Use 208
- Outside WebDAV – 208 is not used in standard HTTP REST APIs.
- If the resource is genuinely different – if the same URI appears but with different properties, it's an error; 208 should only be used when the resource is identical.
Related WebDAV Codes
- 207 Multi-Status – the container that holds 208 responses.
- 424 Failed Dependency – indicates that a request failed because a previous action failed.
- 507 Insufficient Storage – server ran out of disk space.
Frequently Asked Questions
Is 208 Already Reported an error?
No, it's a success code (2xx) within a 207 Multi-Status response. It simply informs the client that the resource was already covered.
Can 208 appear outside a 207 response?
No, 208 is only meaningful inside a multistatus body. It should never be used as a standalone HTTP status code.
What if a client ignores 208 and duplicates the resource?
It will still work, but the client will waste bandwidth and processing power. Following 208 allows for more efficient handling of large collections.