@@ -15,7 +15,7 @@ Markup Shorthands: css off
15
15
!Commits : [SNAPSHOT-LINK]
16
16
!Commits : <a href=https://twitter.com/fetchstandard>@fetchstandard</a>
17
17
!Translation (non-normative): <span title=Japanese><a href=https://triple-underscore.github.io/Fetch-ja.html lang=ja hreflang=ja rel=alternate>日本語</a></span>
18
- Translate IDs : typedefdef-bodyinit bodyinit,typedefdef-responsebodyinit responsebodyinit, dictdef-requestinit requestinit,typedefdef-requestinfo requestinfo,enumdef-requesttype requesttype,enumdef-requestdestination requestdestination,enumdef-requestmode requestmode,enumdef-requestcredentials requestcredentials,enumdef-requestcache requestcache,enumdef-requestredirect requestredirect,dictdef-responseinit responseinit,enumdef-responsetype responsetype
18
+ Translate IDs : typedefdef-bodyinit bodyinit,dictdef-requestinit requestinit,typedefdef-requestinfo requestinfo,enumdef-requesttype requesttype,enumdef-requestdestination requestdestination,enumdef-requestmode requestmode,enumdef-requestcredentials requestcredentials,enumdef-requestcache requestcache,enumdef-requestredirect requestredirect,dictdef-responseinit responseinit,enumdef-responsetype responsetype
19
19
</pre>
20
20
21
21
<script src=https://resources.whatwg.org/file-issue.js async></script>
@@ -589,6 +589,9 @@ user-agent-defined <a for=header>value</a> for the
589
589
590
590
<li><p> A <dfn export for=body id=concept-body-total-bytes>total bytes</dfn> (an
591
591
integer), initially 0.
592
+
593
+ <li><p> A <dfn export for=body id=concept-body-replayable>replayable flag</dfn> (a boolean),
594
+ initially false.
592
595
</ul>
593
596
594
597
<p> A <a for=/>body</a> <var> body</var> is said to be
@@ -3025,6 +3028,11 @@ in addition to <a>HTTP fetch</a> above.
3025
3028
<a lt="include credential">includes credentials</a> , then return a
3026
3029
<a>network error</a> .
3027
3030
3031
+ <li><p> If <var> request</var> 's <a for=request>method</a> is not <code> 303</code> ,
3032
+ <var> request</var> 's <a for=request>body</a> is not null, and <var>request</var>' s
3033
+ <a for=request>body</a> 's <a for=body>replayable flag</a> is false, then return a
3034
+ <a>network error</a> .
3035
+
3028
3036
<li>
3029
3037
<p> If <i> CORS flag</i> is set and <var> actualResponse</var> 's
3030
3038
<a for=response>location URL</a>
@@ -3366,6 +3374,10 @@ steps:
3366
3374
<li class=XXX><p> Needs testing: multiple `<code> WWW-Authenticate</code> ` headers, missing,
3367
3375
parsing issues.
3368
3376
3377
+ <li><p> If <var> request</var> 's <a for=request>body</a> is not null and <var>request</var>' s
3378
+ <a for=request>body</a> 's <a for=body>replayable flag</a> is false, then return a
3379
+ <a>network error</a> .
3380
+
3369
3381
<li>
3370
3382
<p> If <var> request</var> 's
3371
3383
<a for=request>use-URL-credentials flag</a> is unset or
@@ -4240,9 +4252,7 @@ method, when invoked, must run these steps:
4240
4252
<h3 id=body-mixin>Body mixin</h3>
4241
4253
4242
4254
<pre class=idl>
4243
- typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) BodyInit;
4244
-
4245
- typedef (BodyInit or ReadableStream) ResponseBodyInit;</pre>
4255
+ typedef (Blob or BufferSource or FormData or URLSearchParams or USVString or ReadableStream) BodyInit;</pre>
4246
4256
4247
4257
<p> To <dfn id=concept-bodyinit-extract for=BodyInit export>extract</dfn> a <a for=/>body</a> and a
4248
4258
`<code> Content-Type</code> ` <a for=header>value</a> from
@@ -4255,7 +4265,9 @@ typedef (BodyInit or ReadableStream) ResponseBodyInit;</pre>
4255
4265
4256
4266
<li><p> Let <var> Content-Type</var> be null.
4257
4267
4258
- <li><p> Let <var> action</var> be null.
4268
+ <li><p> Let <var> action</var> be null.
4269
+
4270
+ <li><p> Let <var> replayable</var> be false.
4259
4271
4260
4272
<li>
4261
4273
<p> Switch on <var> object</var> 's type:
@@ -4268,6 +4280,8 @@ typedef (BodyInit or ReadableStream) ResponseBodyInit;</pre>
4268
4280
<p> If <var> object</var> 's {{Blob/type}}
4269
4281
attribute is not the empty byte sequence, set <var> Content-Type</var> to its value.
4270
4282
4283
+ <p> Set <var> replayable</var> to true.
4284
+
4271
4285
<dt><code> BufferSource</code>
4272
4286
<dd>
4273
4287
<p> <a for=ReadableStream>Enqueue</a> a <code> Uint8Array</code> object
@@ -4276,6 +4290,8 @@ typedef (BodyInit or ReadableStream) ResponseBodyInit;</pre>
4276
4290
<var> stream</var> . If that threw an exception,
4277
4291
<a abstract-op>error</a> <var> stream</var> with that exception.
4278
4292
4293
+ <p> Set <var> replayable</var> to true.
4294
+
4279
4295
<dt> {{FormData}}
4280
4296
<dd>
4281
4297
<p> Set <var> action</var> to an action that runs the
@@ -4288,6 +4304,8 @@ typedef (BodyInit or ReadableStream) ResponseBodyInit;</pre>
4288
4304
<a><code>multipart/form-data</code> boundary string</a> generated by the
4289
4305
<a><code>multipart/form-data</code> encoding algorithm</a> .
4290
4306
4307
+ <p> Set <var> replayable</var> to true.
4308
+
4291
4309
<dt> {{URLSearchParams}}
4292
4310
<dd>
4293
4311
<p> Set <var> action</var> to an action that runs the
@@ -4299,12 +4317,16 @@ typedef (BodyInit or ReadableStream) ResponseBodyInit;</pre>
4299
4317
<p> Set <var> Content-Type</var> to
4300
4318
`<code> application/x-www-form-urlencoded;charset=UTF-8</code> `.
4301
4319
4320
+ <p> Set <var> replayable</var> to true.
4321
+
4302
4322
<dt><code> USVString</code>
4303
4323
<dd>
4304
4324
<p> Set <var> action</var> to an action that runs <a>utf-8 encode</a> on <var> object</var> .
4305
4325
4306
4326
<p> Set <var> Content-Type</var> to `<code> text/plain;charset=UTF-8</code> `.
4307
4327
4328
+ <p> Set <var> replayable</var> to true.
4329
+
4308
4330
<dt> {{ReadableStream}}
4309
4331
<dd><p> Set <var> stream</var> to <var> object</var> .
4310
4332
</dl>
@@ -4329,7 +4351,8 @@ typedef (BodyInit or ReadableStream) ResponseBodyInit;</pre>
4329
4351
</ol>
4330
4352
4331
4353
<li><p> Let <var> body</var> be a <a for=/>body</a> whose
4332
- <a for=body>stream</a> is <var> stream</var> .
4354
+ <a for=body>stream</a> is <var> stream</var> and <a for=body>replayable flag</a> is
4355
+ <var> replayable</var> .
4333
4356
4334
4357
<li><p> Return <var> body</var> and <var> Content-Type</var> .
4335
4358
</ol>
@@ -4956,7 +4979,7 @@ run these steps:
4956
4979
4957
4980
<h3 id=response-class>Response class</h3>
4958
4981
4959
- <pre class=idl> [Constructor(optional ResponseBodyInit ? body = null, optional ResponseInit init),
4982
+ <pre class=idl> [Constructor(optional BodyInit ? body = null, optional ResponseInit init),
4960
4983
Exposed=(Window,Worker)]
4961
4984
interface Response {
4962
4985
[NewObject] static Response error();
0 commit comments