HTTP

HTTP 413 Content Too Large vs 416 Range Not Satisfiable

Both HTTP 413 (Content Too Large) and 416 (Range Not Satisfiable) belong to the 4xx Client Error category. 413 indicates that the request payload exceeds the server's size limit. Meanwhile, 416 means that the server cannot serve the requested byte range. The Range header value is outside the resource's size.

Description

The request payload exceeds the server's size limit.

When You See It

When uploading files that exceed the server's maximum upload size.

How to Fix

Reduce the payload size. Check server limits (Nginx: client_max_body_size, Apache: LimitRequestBody).

Description

The server cannot serve the requested byte range. The Range header value is outside the resource's size.

When You See It

When requesting a byte range beyond the file's actual size.

How to Fix

Check the Content-Range in the response for the actual file size and adjust your Range header.

Key Differences

1.

HTTP 413: The request payload exceeds the server's size limit.

2.

HTTP 416: The server cannot serve the requested byte range. The Range header value is outside the resource's size.

3.

You encounter 413 when when uploading files that exceed the server's maximum upload size.

4.

You encounter 416 when when requesting a byte range beyond the file's actual size.

When to Use Which

For 413 (Content Too Large): Reduce the payload size. Check server limits (Nginx: client_max_body_size, Apache: LimitRequestBody). For 416 (Range Not Satisfiable): Check the Content-Range in the response for the actual file size and adjust your Range header.

Learn More