Skip to content

Commit 5629d15

Browse files
committed
Editorial: name variable internalResponse consistently
As discovered in #1645.
1 parent 931cd06 commit 5629d15

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

fetch.bs

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5063,9 +5063,7 @@ these steps:
50635063
<ol>
50645064
<li><p>Let <var>request</var> be <var>fetchParams</var>'s <a for="fetch params">request</a>.
50655065

5066-
<li><p>Let <var>response</var> be null.
5067-
5068-
<li><p>Let <var>actualResponse</var> be null.
5066+
<li><p>Let <var>response</var> and <var>internalResponse</var> be null.
50695067

50705068
<li>
50715069
<p>If <var>request</var>'s <a>service-workers mode</a> is "<code>all</code>", then:
@@ -5126,9 +5124,9 @@ these steps:
51265124
<li>If <var>request</var>'s <a for=request>body</a> is non-null, then
51275125
<a for=ReadableStream>cancel</a> <var>request</var>'s <a for=request>body</a> with undefined.
51285126

5129-
<li><p>Set <var>actualResponse</var> to <var>response</var>, if <var>response</var> is not a
5130-
<a>filtered response</a>, and to <var>response</var>'s
5131-
<a for="filtered response">internal response</a> otherwise.
5127+
<li><p>Set <var>internalResponse</var> to <var>response</var>, if <var>response</var> is not a
5128+
<a>filtered response</a>; otherwise to <var>response</var>'s
5129+
<a for="filtered response">internal response</a>.
51325130

51335131
<li>
51345132
<p>If one of the following is true
@@ -5194,7 +5192,7 @@ these steps:
51945192
<p class=note>Redirects coming from the network (as opposed to from a service worker) are not to
51955193
be exposed to a service worker.
51965194

5197-
<li><p>Set <var>response</var> and <var>actualResponse</var> to the result of running
5195+
<li><p>Set <var>response</var> and <var>internalResponse</var> to the result of running
51985196
<a>HTTP-network-or-cache fetch</a> given <var>fetchParams</var>.
51995197

52005198
<li>
@@ -5215,20 +5213,20 @@ these steps:
52155213
<a for=response>type</a> is "<code>opaque</code>", and the
52165214
<a>cross-origin resource policy check</a> with <var>request</var>'s <a for=request>origin</a>,
52175215
<var>request</var>'s <a for=request>client</a>, <var>request</var>'s
5218-
<a for=request>destination</a>, and <var>actualResponse</var> returns <b>blocked</b>, then return
5219-
a <a>network error</a>.
5216+
<a for=request>destination</a>, and <var>internalResponse</var> returns <b>blocked</b>, then
5217+
return a <a>network error</a>.
52205218

52215219
<p class=note>The <a>cross-origin resource policy check</a> runs for responses coming from the
52225220
network and responses coming from the service worker. This is different from the
52235221
<a>CORS check</a>, as <var>request</var>'s <a for=request>client</a> and the service worker can
52245222
have different embedder policies.
52255223

52265224
<li>
5227-
<p>If <var>actualResponse</var>'s <a for=response>status</a> is a <a>redirect status</a>, then:
5225+
<p>If <var>internalResponse</var>'s <a for=response>status</a> is a <a>redirect status</a>:
52285226

52295227
<ol>
52305228
<li>
5231-
<p>If <var>actualResponse</var>'s <a for=response>status</a> is not 303, <var>request</var>'s
5229+
<p>If <var>internalResponse</var>'s <a for=response>status</a> is not 303, <var>request</var>'s
52325230
<a for=request>body</a> is non-null, and the <a>connection</a> uses HTTP/2, then user agents
52335231
may, and are even encouraged to, transmit an <code>RST_STREAM</code> frame.
52345232

@@ -5252,18 +5250,18 @@ these steps:
52525250
given <var>fetchParams</var> and <var>response</var>.
52535251

52545252
<li><p>Otherwise, set <var>response</var> to an <a>opaque-redirect filtered response</a>
5255-
whose <a for="filtered response">internal response</a> is <var>actualResponse</var>.
5253+
whose <a for="filtered response">internal response</a> is <var>internalResponse</var>.
52565254
</ol>
52575255

52585256
<dt>"<code>follow</code>"
52595257
<dd>
52605258
<ol><li><p>Set <var>response</var> to the result of running <a>HTTP-redirect fetch</a> given
52615259
<var>fetchParams</var> and <var>response</var>.</ol>
52625260
</dl>
5263-
<!-- not resetting actualResponse since it's no longer used anyway -->
5261+
<!-- not resetting internalResponse since it's no longer used anyway -->
52645262
</ol>
52655263

5266-
<li><p>Return <var>response</var>. <span class=note>Typically <var>actualResponse</var>'s
5264+
<li><p>Return <var>response</var>. <span class=note>Typically <var>internalResponse</var>'s
52675265
<a for=response>body</a>'s <a for=body>stream</a> is still being enqueued to after
52685266
returning.</span>
52695267
</ol>
@@ -5280,11 +5278,11 @@ run these steps:
52805278
<ol>
52815279
<li><p>Let <var>request</var> be <var>fetchParams</var>'s <a for="fetch params">request</a>.
52825280

5283-
<li><p>Let <var>actualResponse</var> be <var>response</var>, if <var>response</var> is not a
5284-
<a>filtered response</a>, and <var>response</var>'s
5285-
<a for="filtered response">internal response</a> otherwise.
5281+
<li><p>Let <var>internalResponse</var> be <var>response</var>, if <var>response</var> is not a
5282+
<a>filtered response</a>; otherwise <var>response</var>'s
5283+
<a for="filtered response">internal response</a>.
52865284

5287-
<li><p>Let <var>locationURL</var> be <var>actualResponse</var>'s <a for=response>location URL</a>
5285+
<li><p>Let <var>locationURL</var> be <var>internalResponse</var>'s <a for=response>location URL</a>
52885286
given <var>request</var>'s <a for=request>current URL</a>'s <a for=url>fragment</a>.
52895287

52905288
<li><p>If <var>locationURL</var> is null, then return <var>response</var>.
@@ -5310,17 +5308,17 @@ run these steps:
53105308

53115309
<p class=note>This catches a cross-origin resource redirecting to a same-origin URL.
53125310

5313-
<li><p>If <var>actualResponse</var>'s <a for=response>status</a> is not 303, <var>request</var>'s
5311+
<li><p>If <var>internalResponse</var>'s <a for=response>status</a> is not 303, <var>request</var>'s
53145312
<a for=request>body</a> is non-null, and <var>request</var>'s <a for=request>body</a>'s
53155313
<a for=body>source</a> is null, then return a <a>network error</a>.
53165314

53175315
<li>
53185316
<p>If one of the following is true
53195317

53205318
<ul class=brief>
5321-
<li><p><var>actualResponse</var>'s <a for=response>status</a> is 301 or 302 and
5319+
<li><p><var>internalResponse</var>'s <a for=response>status</a> is 301 or 302 and
53225320
<var>request</var>'s <a for=request>method</a> is `<code>POST</code>`
5323-
<li><p><var>actualResponse</var>'s <a for=response>status</a> is 303 and <var>request</var>'s
5321+
<li><p><var>internalResponse</var>'s <a for=response>status</a> is 303 and <var>request</var>'s
53245322
<a for=request>method</a> is not `<code>GET</code>` or `<code>HEAD</code>`
53255323
</ul>
53265324

@@ -5369,7 +5367,7 @@ run these steps:
53695367
<a for=request>URL list</a>.
53705368

53715369
<li><p>Invoke <a>set <var>request</var>'s referrer policy on redirect</a> on <var>request</var> and
5372-
<var>actualResponse</var>. [[!REFERRER]]
5370+
<var>internalResponse</var>. [[!REFERRER]]
53735371

53745372
<li><p>Let <var>recursive</var> be true.
53755373

0 commit comments

Comments
 (0)