Skip to content

416 Range Not Satisfiable (HTTP Status Code 416)

Updated: at 09:12 AM

This server error response code indicates that the byte range specified in the client’s request cannot be fulfilled.

Meaning

The server is unable to satisfy the requested byte range. This typically occurs when the client requests a part of a file (using a range request), but the requested range exceeds the actual size of the file.

Use Cases

Example

Assuming a file size of 1000 bytes, if the client requests the range 2000-3000 bytes, the server will return a 416 status code.

Server Response

The server usually includes a Content-Range header in the response to indicate the actual size of the resource. For example:

HTTP/1.1 416 Range Not Satisfiable
Content-Range: bytes */1000

Client Handling

Upon receiving a 416 response, the client should reassess its requested range, potentially re-requesting the entire resource or adjusting the range.

Preventive Measures

Developers should ensure that the client validates the current size of the resource before sending a range request, especially when dealing with dynamic content that may change.

To avoid this error, the client should first retrieve the total size of the resource (which can be done using a HEAD request) before sending a range request.