207
HTTPSUCCESSCommon2xx SuccessHIGH confidence

Multi-Status

Production Risk

Low. It is the standard method for complex responses in WebDAV. The client application must be capable of parsing the XML body to understand the results.

What this means

A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate. The response body is an XML message and contains a separate response for each of the sub-requests.

Why it happens
  1. 1A WebDAV client requests properties of multiple files in a directory.
  2. 2A client performs a batch operation on a server, where some operations may succeed and others may fail.
  3. 3The server needs to communicate the outcome of each individual operation within a single HTTP response.
How to reproduce

A user attempts to delete three files using a WebDAV client, where two deletions succeed and one fails due to permissions.

trigger — this will error
trigger — this will error
PROPFIND /container/ HTTP/1.1
Host: example.com
Depth: 1

expected output

HTTP/1.1 207 Multi-Status

Fix

Parse the XML body of a 207 response to check each sub-result

Parse the XML body of a 207 response to check each sub-result
// Client-side: parse a WebDAV 207 Multi-Status XML response
async function sendWebDAVRequest(url) {
  const response = await fetch(url, {
    method: 'PROPFIND',
    headers: { Depth: '1' },
  });

  if (response.status === 207) {
    const xmlText = await response.text();
    const parser = new DOMParser();
    const doc = parser.parseFromString(xmlText, 'application/xml');

    const responses = doc.querySelectorAll('response');
    for (const r of responses) {
      const href = r.querySelector('href')?.textContent;
      const status = r.querySelector('status')?.textContent;
      console.log(`${href}: ${status}`);
      // Each <response> has its own <status> — check each one individually
    }
  }
}

Why this works

207 Multi-Status wraps multiple HTTP sub-responses in a single XML body. A top-level 207 does NOT mean all operations succeeded — individual <response> elements each contain their own <status> code that may be 200, 403, 404, or any other HTTP status. Client code must iterate and check each sub-response status independently rather than treating the 207 itself as a blanket success.

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All HTTP errors