2015-11-06 21:39:33 +01:00
|
|
|
---
|
|
|
|
set: 4
|
|
|
|
code: 416
|
|
|
|
title: Requested Range Not Satisfiable
|
2015-11-07 05:34:40 +01:00
|
|
|
references:
|
|
|
|
"Rails HTTP Status Symbol": ":requested_range_not_satisfiable"
|
2016-01-27 23:08:33 +01:00
|
|
|
"Go HTTP Status Constant": "http.StatusRequestedRangeNotSatisfiable"
|
2015-11-06 21:39:33 +01:00
|
|
|
---
|
|
|
|
|
2015-11-09 02:44:05 +01:00
|
|
|
None of the ranges in the request's Range header field<sup>[1](#ref-1)</sup>
|
|
|
|
overlap the current extent of the selected resource or that the set of ranges
|
|
|
|
requested has been rejected due to invalid ranges or an excessive request of
|
|
|
|
small or overlapping ranges.
|
2015-11-07 05:34:40 +01:00
|
|
|
|
|
|
|
For byte ranges, failing to overlap the current extent means that the
|
|
|
|
first-byte-pos of all of the byte-range-spec values were greater than the
|
|
|
|
current length of the selected representation. When this status code is
|
|
|
|
generated in response to a byte-range request, the sender SHOULD generate a
|
|
|
|
Content-Range header field specifying the current length of the selected
|
2015-11-09 02:44:05 +01:00
|
|
|
representation<sup>[2](#ref-2)</sup>.
|
2015-11-07 05:34:40 +01:00
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
```
|
|
|
|
HTTP/1.1 416 Range Not Satisfiable
|
|
|
|
Date: Fri, 20 Jan 2012 15:41:54 GMT
|
|
|
|
Content-Range: bytes */47022
|
|
|
|
```
|
|
|
|
|
|
|
|
Note: Because servers are free to ignore Range, many implementations will simply
|
2015-11-09 02:44:05 +01:00
|
|
|
respond with the entire selected representation in a [200 OK](/200) response.
|
|
|
|
That is partly because most clients are prepared to receive a [200 OK](/200)
|
2015-11-07 05:34:40 +01:00
|
|
|
to complete the task (albeit less efficiently) and partly because clients might
|
|
|
|
not stop making an invalid partial request until they have received a complete
|
|
|
|
representation. Thus, clients cannot depend on receiving a
|
2015-11-09 02:44:05 +01:00
|
|
|
416 Range Not Satisfiable response even when it is most appropriate.
|
2015-11-07 05:34:40 +01:00
|
|
|
|
2015-11-09 02:44:05 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
* <span id="ref-1"><sup>1</sup> Range [RFC7233 Section 3.1][2]</span>
|
|
|
|
* <span id="ref-2"><sup>2</sup> Content-Range [RFC7233 Section 4.2][3]</span>
|
|
|
|
* Source: [RFC7233 Section 4.4][1]
|
2015-11-07 05:34:40 +01:00
|
|
|
|
|
|
|
[1]: <http://tools.ietf.org/html/rfc7233#section-4.4>
|
|
|
|
[2]: <http://tools.ietf.org/html/rfc7233#section-3.1>
|
2016-01-27 23:08:33 +01:00
|
|
|
[3]: <http://tools.ietf.org/html/rfc7233#section-4.2>
|