Re: [whatwg/fetch] Add support for blob range requests (PR #1520)

@dlrobertson commented on this pull request.



> +
+        <p class="note">A range header denotes an inclusive byte range, while the <a>slice blob</a>
+        algorithm input range does not. To use the <a>slice blob</a> algorithm, we must increment
+        the parsed range header end value.
+
+       <li><p>Let <var>slicedBlob</var> be the result of invoking <a>slice blob</a> given
+       <var>blobURLEntry</var>'s <a for="blob URL entry">object</a>, <var>rangeValue</var>[0],
+       <var>sliceEndRange</var>, and <var>type</var>.
+
+       <li><p>Let <var>slicedBodyWithType</var> be the result of
+       <a for=BodyInit>safely extracting</a> <var>slicedBlob</var>.
+
+       <li><p>Set <var>response</var>'s <a for=response>body</a> to <var>slicedBodyWithType</var>'s
+       <a for="body with type">body</a>.
+
+       <li><p>Let <var>contentRange</var> be `<code>bytes </code>`.

I didn't move `contentRange` into another algorithm, but this should definitely be done. I'm currently planning on doing this in a follow up issue, but I can do it here if that is preferred.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1520#pullrequestreview-1192028489
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1520/review/1192028489@github.com>

Received on Wednesday, 23 November 2022 17:42:08 UTC