Re: [whatwg/fetch] blob: URLs and range requests (#1070)

According to [HTTP-RANGE Section 2.1](https://httpwg.org/specs/rfc7233.html#rfc.section.2.1):

> The [last-byte-pos](https://httpwg.org/specs/rfc7233.html#rule.ranges-specifier) value gives the byte-offset of the last byte in the range; that is, the byte positions specified are inclusive.

But according to [File API 3.3.1](https://w3c.github.io/FileAPI/#slice-method-algo):

> `slice()` method returns a new [Blob](https://w3c.github.io/FileAPI/#dfn-Blob) object with bytes ranging from the optional [start](https://w3c.github.io/FileAPI/#dfn-start) parameter up to but not including the optional [end](https://w3c.github.io/FileAPI/#dfn-end) parameter

This will not impact parsing, but could impact how we read the sliced blob etc. Currently both chrome and safari treat the range like an HTTP Range. I think this makes sense, as this would be more intuitive to the end user and we can use `rangeStart` and `rangeEnd + 1` to slice the blob.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1070#issuecomment-1146478019
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1070/1146478019@github.com>

Received on Saturday, 4 June 2022 00:34:22 UTC