Re: [whatwg/fetch] Allow range header without preflight (#1312)

@yutakahirano commented on this pull request.



> @@ -1038,6 +1041,77 @@ run these steps:
  <li><p>Return <var>values</var>.
 </ol>
 
+<p>To determine if a <a>byte sequence</a> <var>value</var> is a
+<dfn>simple range header value</dfn>, perform the following steps. They return a <a>boolean</a>.
+
+<ol>
+ <li><p>If <var>value</var> does not <a for="byte sequence">start with</a> `<code>bytes </code>`,
+ then return false.
+
+ <li><p>If the 6th <a>byte</a> of <var>value</var> is not in the range 0x30 (0) to 0x39 (9),
+ inclusive, then return false.
+
+ <li><p>Let <var>rangeStartBytes</var> be the 6th <a>byte</a> of <var>value</var>.

Is "_i_ th" well-defined? I'm wondering if it's 0-based or 1-based.

> @@ -1038,6 +1041,77 @@ run these steps:
  <li><p>Return <var>values</var>.
 </ol>
 
+<p>To determine if a <a>byte sequence</a> <var>value</var> is a
+<dfn>simple range header value</dfn>, perform the following steps. They return a <a>boolean</a>.
+
+<ol>

How about using regexp?

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

Received on Tuesday, 28 September 2021 10:02:40 UTC