@@ -1020,7 +1020,7 @@ fetch("https://victim.example/naïve-endpoint", {
1020
1020
<dd>
1021
1021
<ol>
1022
1022
<li><p> Let <var> rangeValue</var> be the result of <a>parsing a single range header value</a>
1023
- given <var> value</var> .
1023
+ given <var> value</var> and false .
1024
1024
1025
1025
<li><p> If <var> rangeValue</var> is failure, then return false.
1026
1026
@@ -1292,28 +1292,45 @@ run these steps:
1292
1292
1293
1293
<div algorithm>
1294
1294
<p> To <dfn id=simple-range-header-value>parse a single range header value</dfn> from a
1295
- <a>byte sequence</a> <var> value</var> , run these steps:
1295
+ <a>byte sequence</a> <var> value</var> and a boolean <var> allowWhitespace </var> , run these steps:
1296
1296
1297
1297
<ol>
1298
1298
<li><p> Let <var> data</var> be the <a>isomorphic decoding</a> of <var> value</var> .
1299
1299
1300
- <li><p> If <var> data</var> does not <a for=string>start with</a> "<code> bytes= </code> ", then return
1300
+ <li><p> If <var> data</var> does not <a for=string>start with</a> "<code> bytes</code> ", then return
1301
1301
failure.
1302
1302
1303
1303
<li><p> Let <var> position</var> be a <a>position variable</a> for <var> data</var> , initially
1304
- pointing at the 6th <a>code point</a> of <var> data</var> .
1304
+ pointing at the 5th <a>code point</a> of <var> data</var> .
1305
+
1306
+ <li><p> If <var> allowWhitespace</var> is true, <a>collect a sequence of code points</a> that are
1307
+ <a>HTTP tab or space</a> , from <var> data</var> given <var> position</var> .
1308
+
1309
+ <li><p> If the <a>code point</a> at <var> position</var> within <var> data</var> is not U+003D (=),
1310
+ then return failure.
1311
+
1312
+ <li><p> Advance <var> position</var> by 1.
1313
+
1314
+ <li><p> If <var> allowWhitespace</var> is true, <a>collect a sequence of code points</a> that are
1315
+ <a>HTTP tab or space</a> , from <var> data</var> given <var> position</var> .
1305
1316
1306
1317
<li><p> Let <var> rangeStart</var> be the result of <a>collecting a sequence of code points</a> that
1307
1318
are <a>ASCII digits</a> , from <var> data</var> given <var> position</var> .
1308
1319
1309
1320
<li><p> Let <var> rangeStartValue</var> be <var> rangeStart</var> , interpreted as decimal number, if
1310
1321
<var> rangeStart</var> is not the empty string; otherwise null.
1311
1322
1323
+ <li><p> If <var> allowWhitespace</var> is true, <a>collect a sequence of code points</a> that are
1324
+ <a>HTTP tab or space</a> , from <var> data</var> given <var> position</var> .
1325
+
1312
1326
<li><p> If the <a>code point</a> at <var> position</var> within <var> data</var> is not U+002D (-),
1313
1327
then return failure.
1314
1328
1315
1329
<li><p> Advance <var> position</var> by 1.
1316
1330
1331
+ <li><p> If <var> allowWhitespace</var> is true, <a>collect a sequence of code points</a> that are
1332
+ <a>HTTP tab or space</a> , from <var> data</var> given <var> position</var> .
1333
+
1317
1334
<li><p> Let <var> rangeEnd</var> be the result of <a>collecting a sequence of code points</a> that
1318
1335
are <a>ASCII digits</a> , from <var> data</var> given <var> position</var> .
1319
1336
0 commit comments