Already Reported
Production Risk
Low. It is a protocol-specific optimization. A client that does not understand it might process redundant data but it should not cause an error.
Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly. It indicates that the members of a collection have already been reported in a previous part of the Multi-Status response.
- 1A WebDAV PROPFIND request encounters the same resource multiple times in its scan, perhaps due to symbolic links or multiple bindings.
- 2The server uses this status to avoid sending redundant information and keep the response size down.
- 3This is a WebDAV-specific optimization within a 207 Multi-Status response.
A WebDAV server is listing a directory's contents and has already listed a specific collection; it uses 208 to indicate this when it encounters the collection again.
(This status appears inside the XML body of a 207 Multi-Status response) <D:response> <D:href>/shared/</D:href> <D:status>HTTP/1.1 208 Already Reported</D:status> </D:response>
expected output
(part of a 207 response)
Fix
Skip already-reported resources when iterating a 207 Multi-Status response
// Client-side: handle 208 inside a 207 body
async function parseMultiStatus(xmlText) {
const parser = new DOMParser();
const doc = parser.parseFromString(xmlText, 'application/xml');
const seen = new Set();
for (const r of doc.querySelectorAll('response')) {
const href = r.querySelector('href')?.textContent;
const statusText = r.querySelector('status')?.textContent ?? '';
if (statusText.includes('208 Already Reported')) {
// This resource was already enumerated earlier in this 207 body
// Skip it to avoid duplicate processing
console.log(`Skipping already-reported resource: ${href}`);
continue;
}
if (!seen.has(href)) {
seen.add(href);
processResource(href, statusText);
}
}
}Why this works
208 Already Reported appears inside a 207 Multi-Status XML body when a WebDAV server has encountered the same collection or binding more than once during a recursive PROPFIND. It prevents infinite loops and duplicate data from circular references (e.g. symlinks). Client code must treat a 208 sub-response as 'this resource was already listed elsewhere in this response' and skip it rather than processing it as a new entry.
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev