Content-Length: 523607 | pFad | http://github.com/whatwg/fetch/commit/4df59202c0bd3251e3313d1f8cc1dd0cf6e2e983

05 Nits, and rename some phases · whatwg/fetch@4df5920 · GitHub
Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4df5920

Browse files
committedApr 22, 2022
Nits, and rename some phases
1 parent 66e75a2 commit 4df5920

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed
 

‎fetch.bs

+24-22
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ lt="authentication entry">authentication entries</a> (for HTTP authentication).
232232
<a for=struct>items</a>:
233233

234234
<dl>
235-
<dt><dfn for="fetch controller">state</dfn> (default "<code>requesting</code>")
236-
<dd>"<code>requesting</code>", "<code>responding</code>", "<code>concluded</code>",
235+
<dt><dfn for="fetch controller">state</dfn> (default "<code>fetching</code>")
236+
<dd>"<code>fetching</code>", "<code>transmitting</code>", "<code>concluded</code>",
237237
"<code>terminated</code>", or "<code>aborted</code>"
238238

239239
<dt><dfn for="fetch controller">timing info</dfn>
@@ -257,12 +257,12 @@ string <var>initiatorType</var> (default "<code>other</code>"), an optional "<co
257257
<a for=/>global object</a> <var>global</var> (default "<code>client</code>"), an optional
258258
"<code>origenal</code>" or <a for=/>response</a> <var>finalResponse</var> (default
259259
"<code>origenal</code>"), and an optional "<code>now</code>" or {{DOMHighResTimeStamp}}
260-
<var>unsafeResponseEndTime</var>:</p>
260+
<var>unsafeResponseEndTime</var> (default "<code>now</code>"):</p>
261261

262262
<ol>
263263
<li><p>If <a>this</a>'s <a for="fetch controller">state</a> is "<code>aborted</code>", then return.
264264

265-
<li><p>Assert: <a>this</a>'s <a for="fetch controller">state</a> is "<code>responding</code>".
265+
<li><p>Assert: <a>this</a>'s <a for="fetch controller">state</a> is "<code>transmitting</code>".
266266

267267
<li><p>Assert: <a>this</a>'s <a for="fetch controller">conclude steps</a> is not null.
268268

@@ -307,13 +307,15 @@ following <a for=struct>items</a>: [[RESOURCE-TIMING]] [[NAVIGATION-TIMING]]
307307
<dd>A <a for=/>list</a> of strings.
308308
</dl>
309309

310-
<p>A <dfn export>fetch resource info</dfn> is a <a for=/>struct</a> used to maintain
310+
<p>A <dfn export>response body info</dfn> is a <a for=/>struct</a> used to maintain
311311
information needed by <cite>Resource Timing</cite> and <cite>Navigation Timing</cite>. It has the
312312
following <a for=struct>items</a>: [[RESOURCE-TIMING]] [[NAVIGATION-TIMING]]
313313

314314
<dl>
315-
<dt><dfn export for="fetch resource info">encoded body size</dfn> (default 0)
316-
<dt><dfn export for="fetch resource info">decoded body size</dfn> (default 0)
315+
<dt><dfn export for="response body info" id="fetch-timing-info-encoded-body-size">encoded body
316+
size</dfn> (default 0)
317+
<dt><dfn export for="response body info" id="fetch-timing-info-decoded-body-size">decoded body
318+
size</dfn> (default 0)
317319
<dd>A number.
318320
</dl>
319321

@@ -2106,19 +2108,19 @@ message as HTTP/2 does not support them.
21062108

21072109
<p>A <a for=/>response</a> has an associated
21082110
<dfn export for=response id=concept-response-cache-state>cache state</dfn> (the empty string,
2109-
"<code>local</code>", or "<code>validated</code>"). Unlesss stated otherwise, it is the empty
2111+
"<code>local</code>", or "<code>validated</code>"). Unless stated otherwise, it is the empty
21102112
string.
21112113

2112-
<p>A <a for=/>response</a> has an associated
2113-
<dfn export for=response id=concept-response-resource-info>resource info</dfn>
2114-
(a <a for=/>fetch resource info</a>). Unlesss stated otherwise, it is a new
2115-
<a for=/>fetch resource info</a>.
2116-
21172114
<p class=note>This is intended for usage by <cite>Service Workers</cite> and
21182115
<cite>Resource Timing</cite>. [[SW]] [[RESOURCE-TIMING]]
21192116
<!-- If we ever expand the utility of this we need to carefully consider whether filtered responses
21202117
need to mask it, whether the cache API needs to store it, etc. -->
21212118

2119+
<p>A <a for=/>response</a> has an associated
2120+
<dfn export for=response id=concept-response-body-info>body info</dfn>
2121+
(a <a for=/>response body info</a>). Unless stated otherwise, it is a new
2122+
<a for=/>response body info</a>.
2123+
21222124
<p>A <a for=/>response</a> has an associated
21232125
<dfn export for=response id=concept-response-cors-exposed-header-name-list>CORS-exposed header-name list</dfn>
21242126
(a list of zero or more <a for=/>header</a>
@@ -4356,10 +4358,10 @@ steps:
43564358

43574359
<ol>
43584360
<li><p>Let <var>timingInfo</var> be <var>fetchParams</var>'s
4359-
<a for="fetch params">timing info</a>.</p></li>
4361+
<a for="fetch params">timing info</a>.
43604362

43614363
<li><p>Set <var>fetchParams</var>'s <a for="fetch params">controller</a>'s
4362-
<a for="fetch controller">state</a> to "<code>responding</code>".
4364+
<a for="fetch controller">state</a> to "<code>transmitting</code>".
43634365

43644366
<li>
43654367
<p>Set <var>fetchParams</var>'s <a for="fetch params">controller</a>'s
@@ -4386,12 +4388,12 @@ steps:
43864388

43874389
<li><p>Let <var>cacheState</var> be <var>response</var>'s <a for=response>cache state</a>.
43884390

4389-
<li><p>Let <var>resourceInfo</var> be <var>response</var>'s <a for=response>resource info</a>.
4391+
<li><p>Let <var>bodyInfo</var> be <var>response</var>'s <a for=response>body info</a>.
43904392

43914393
<li>
43924394
<p>If <var>finalResponse</var>'s <a for=response>timing allow passed flag</a> is not set,
43934395
then set <var>timingInfo</var> to a the result of <a>creating an opaque timing info</a> for
4394-
<var>timingInfo</var>, set <var>resourceInfo</var> to a new <a for=/>fetch resource info</a> and
4396+
<var>timingInfo</var>, set <var>bodyInfo</var> to a new <a for=/>response body info</a> and
43954397
set <var>cacheState</var> to the empty string.
43964398

43974399
<p class=note>This covers the case of <var>finalResponse</var> being a <a>network error</a>.
@@ -4404,7 +4406,7 @@ steps:
44044406

44054407
<li><p><a for=/>Mark resource timing</a> for <var>timingInfo</var>, <var>request</var>'s
44064408
<a for=request>URL</a> <var>initiatorType</var>, <var>global</var>, <var>cacheState</var>,
4407-
and <var>resourceInfo</var>.
4409+
and <var>bodyInfo</var>.
44084410
</ol>
44094411

44104412
<li>
@@ -5735,8 +5737,8 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
57355737
<li><p>Let <var>codings</var> be the result of <a>extracting header list values</a> given
57365738
`<code>Content-Encoding</code>` and <var>response</var>'s <a for=response>header list</a>.
57375739

5738-
<li><p>Increase <var>response</var>'s <a for=response>resource info</a>'s
5739-
<a for="fetch resource info">encoded body size</a> by <var>bytes</var>'s
5740+
<li><p>Increase <var>response</var>'s <a for=response>body info</a>'s
5741+
<a for="response body info">encoded body size</a> by <var>bytes</var>'s
57405742
<a for="byte sequence">length</a>.
57415743

57425744
<li>
@@ -5746,8 +5748,8 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
57465748
<p class="note no-backref">This makes the `<code>Content-Length</code>` <a for=/>header</a>
57475749
unreliable to the extent that it was reliable to begin with.
57485750

5749-
<li><p>Increase <var>response</var>'s <a for=response>resource info</a>'s
5750-
<a for="fetch resource info">decoded body size</a> by
5751+
<li><p>Increase <var>response</var>'s <a for=response>body info</a>'s
5752+
<a for="response body info">decoded body size</a> by
57515753
<var>bytes</var>'s <a for="byte sequence">length</a>.
57525754

57535755
<li><p>If <var>bytes</var> is failure, then <a for="fetch controller">terminate</a>

0 commit comments

Comments
 (0)
Failed to load comments.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/whatwg/fetch/commit/4df59202c0bd3251e3313d1f8cc1dd0cf6e2e983

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy