A range request adds a Range header such as bytes=0-1023 to a GET. A server that supports ranges answers 206 Partial Content with just those bytes and a Content-Range header saying which part of the whole they are. Servers advertise support with Accept-Ranges: bytes; one that ignores the header simply returns the whole resource with 200.
Download managers resume an interrupted transfer by requesting bytes=<received>- ; video players request the range around the position the viewer seeks to; large files can be fetched in parallel chunks. A range the server cannot satisfy — beyond the end of the resource, or malformed — gets 416 Range Not Satisfiable.
That a 200 to a range request is an error. It is a valid answer meaning the server does not do ranges; a client has to handle both and must not append a full body to a partial download it believes is being resumed.
GET /storage/v1/objects/{key} accepts Range: bytes=start-end, answering 206 with the slice, 416 for a range past the end or a malformed one, and 200 with the whole object when no Range is sent.
All glossary terms · Testing techniques · All 39 mock REST APIs
Last updated