redbot
redbot copied to clipboard
Check headers on 206
The server has fulfilled the partial GET request for the resource. The request MUST have included a Range header field (Section 5.4) indicating the desired range, and MAY have included an If-Range header field (Section 5.3) to make the request conditional.
The response MUST include the following header fields:
-
Either a Content-Range header field (Section 5.2) indicating the range included with this response, or a multipart/byteranges Content-Type including Content-Range fields for each part. If a Content-Length header field is present in the response, its value MUST match the actual number of octets transmitted in the message- body.
If the 206 response is the result of an If-Range request, the response SHOULD NOT include other representation header fields. Otherwise, the response MUST include all of the representation header fields that would have been returned with a 200 (OK) response to the same request.
-
Date
-
Cache-Control, ETag, Expires, Content-Location, Last-Modified, and/or Vary, if the header field would have been sent in a 200 response to the same request
Summary:
- Check for range in requests: done
- Check for content-range: done (hardwired)
- Allow multipart/byteranges instead of Content-Range: TODO
- No representation header fields on 206 + if-range: TODO
- Check headers without If-Range: TODO
TODO:
- check for no representation headers fields on 206 + if-range (may need clarification)
- allow multipart/byteranges in a 206 response