On 21.03.2022 15:35, Ulrich Klein wrote:
RFC 7233
4.4 <https://datatracker.ietf.org/doc/html/rfc7233#section-4.4>. 416
Range Not Satisfiable
The 416 (Range Not Satisfiable) status code indicates that none of
the ranges in the request's Range header field (Section 3.1
<https://datatracker.ietf.org/doc/html/rfc7233#section-3.1>) overlap
The section 3.1 say "A server MAY ignore the Range header field."
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 respond with the entire selected
representation in a 200 (OK) response. That is partly because
This is what Nginx and Apache do, if you specify range when the file has
0 bytes they will return 200.
So they are ignore range with 0 bytes files but not when the bytes is
grater than 0.
On 21. 03 2022, at 15:11, Ulrich Klein <ulrich.klein@xxxxxxxxxxxxxx>
wrote:
With a bit of HTTP background I’d say:
bytes=0-1000000 means: First byte to to 1000000nd byte. First byte is
byte #0
On an empty object there is no first byte, i.e. not satisfiable ==>
416
Should be the same as on a single byte object and
bytes=1-1000000
200 OK should only be correct, if the server or a proxy in between
doesn’t support range requests.
After reading your text and links I do concur that returning 416 with 0
bytes with range bytes=0-1000000 is not wrong,
but I also believe that it would be correct to return 200 OK as Nginx
and Apache do, since range can be ignored.
I think our user of Ceph is used to how Nginx and Apache works and that
is the reason they wondered if it was something wrong with Ceph.
So I think the answer to them will be, It's according to spec but you
can always put in a feature request.
--
Kai Stian Olstad
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx