ATOMSEO
  • Log In
  • Sign Up
ATOMSEO

Understanding HTTP 207 Status Code: Meaning and Examples

1. What is 207 Status Code Multi-Status

The 207 Multi-Status status code is an HTTP response status code indicating that the response contains multiple independent status codes for different parts of the response body. It is typically used in Web Distributed Authoring and Versioning (WebDAV) protocols to indicate the status of a series of independent operations as a single response.

Each status code within the response body provides information about the success or failure of a specific operation. This status code allows clients to understand the outcome of each operation within a single response, reducing the need for multiple round-trip requests.

The 207 status code is defined in the HTTP/1.1 specification (RFC 4918) and is not commonly encountered outside WebDAV contexts.

2. Examples of Status Code 207

1. Multi-step authentication:

Description: The server requests additional information from the client to complete authentication.
Example: A client is trying to access a protected resource. The server responds with code 207 and asks for a username and password.

2. Proxy server:

Description: The proxy server informs the client that the request was successfully forwarded to the destination server.
Example: The client sends a request to the proxy server. The proxy server redirects the request to the destination server and responds with code 207.

3. Web DAV:

Description: Used in the WebDAV protocol to notify the client that the request was successfully processed, but the changes were not applied.
Example: A client tries to modify a file on the WebDAV server. The server responds with code 207 to notify the client that another user has locked the file.

4. HTTP/2:

Description: Used in HTTP/2 to notify the client that the server is ready to accept a new data stream.
Example: A client establishes a connection to an HTTP/2 server. The server responds with code 207 to notify the client that it is ready to accept data.

5. HTTP extensions:

Description: Used to implement various HTTP extensions.
Example: A server might use code 207 to implement its own HTTP extension, for example, to notify a client that its software needs to be updated.

It's important to note that code 207 is not a standard HTTP response code. It is used in some specific cases, as described above.

When receiving a 207 code, it is important to read the response header to determine how it is used.

Sometimes, code 207 may be accompanied by an HTTP error code. This means that the server encountered an error while processing the request.

207 status code example

HTTP
HTTP/1.1 207 Multi-Status
Content-Type: application/xml

<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/file1.txt</D:href>
<D:status>HTTP/1.1 200 OK</D:status>
</D:response>
<D:response>
<D:href>/file2.txt</D:href>
<D:status>HTTP/1.1 403 Forbidden</D:status>
</D:response>
</D:multistatus>

In this example:

• The server responds with code 207 Multi-Status.
• The Content-Type header indicates that the response body contains an XML document.
• The XML document contains two D:response elements.
• The first element of D:response contains the code 200 OK, which means that the file file1.txt was successfully processed.
• The second D:response element contains a 403 Forbidden code, which means that access to file2.txt is denied.

This example illustrates how code 207 can be used to notify a client of the results of multiple requests.

3. Differences Between Response Code 207 And Other Codes From the 2xx Group

1. Meaning:

  • 207 Multi-Status: Indicates that the request was successfully processed, but there may be some errors.
  • 200 OK: Indicates that the request was successfully processed.
  • 201 Created: Indicates that the request was successfully processed and a new resource was created.
  • 202 Accepted: Indicates that the request has been accepted but has not yet been processed.
  • 204 No Content: Indicates that the request was successfully processed, but there is no content to respond to.

2. Usage:

  • 207 Multi-Status: Used mainly in the following cases:

o Multi-step authentication: The server requests additional information from the client.
o Proxy: The proxy tells the client that the request has been forwarded.
o WebDAV: The server notifies the client that the changes were not applied.
o HTTP/2: The server tells the client that it is ready to accept a new data stream.
o HTTP Extensions: Implement various HTTP extensions.

  • 200 OK: Used for most successful requests.
  • 201 Created: Used for requests that create a new resource.
  • 202 Accepted: Used for requests that are accepted but not yet processed.
  • 204 No Content: Used for successful requests but have no content to return.

3. Contents of the response:

  • 207 Multi-Status: Contains an XML document with information about the status of multiple requests.
  • 200 OK: Contains the requested resource.
  • 201 Created: Contains the URI of the new resource.
  • 202 Accepted: Contains no content.
  • 204 No Content: Contains no content.

4. Error codes:

  • 207 Multi-Status: May be accompanied by HTTP error codes.
  • 200 OK: Not accompanied by error codes.
  • 201 Created: Not accompanied by error codes.
  • 202 Accepted: Not accompanied by error codes.
  • 204 No Content: Not accompanied by error codes.

It's important to note that code 207 is not a standard HTTP response code.

It is used in some specific cases, as described above.
The 207 status code belongs to the 2xx Success class of server response codes. It indicates that the server has successfully processed the request, but the response might contain multiple status codes for different parts of the response body. For a comprehensive overview of 2xx status codes, you can refer to our general article on HTTP status codes.

It's essential to ensure that all website or web application pages are functioning correctly and return status code 200 for successful requests.

Monitoring this can be achieved using the Atomseo Broken Links Checker tool, which detects server errors, including 207, and allows you to check up to 1500 links daily for free.

6. Learn About Other 2xx Status Codes