Content-Range
Response header Ranges

Overview

Content-Range tells the client, in a partial response (206 Partial Content), where the bytes being sent fit within the full resource. The client uses this to stitch multiple chunks together in the right place.

The format is a unit (usually bytes) followed by start-end offsets and the total size after a slash.

Details

bytes 200-1023/2048 means the body contains bytes 200 through 1023 (0-based, inclusive) of a 2048-byte whole. If the total size is unknown, an asterisk (*) is used. The Content-Length of such a 206 response is the length of this segment (e.g. 824), not the whole.

When the requested range is outside the resource size, the server returns 416 Range Not Satisfiable, using Content-Range: bytes */2048 to convey only the total size so the client can re-request.

This mechanism underpins resumable large downloads, video seeking, and parallel segmented downloads. A server advertises range support by also emitting Accept-Ranges: bytes.

Syntax

Content-Range: <unit> <start>-<end>/<total|*>

e.g. Content-Range: bytes 200-1023/2048

Notes

Related headers

Related status codes

Specification