Skip to content

Commit b5a587b

Browse files
authored
Be more selective with handing out the internal response
Upon reviewing #1645 again it struck me that the first argument to processResponseConsumeBody should not be the internal response. The caller would still have all the same capabilities when it's not and it's safer if it's not.
1 parent 9003266 commit b5a587b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

fetch.bs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4854,11 +4854,10 @@ steps:
48544854
<ol>
48554855
<li><p>Let <var>processBody</var> given <var>nullOrBytes</var> be this step: run
48564856
<var>fetchParams</var>'s <a for="fetch params">process response consume body</a> given
4857-
<var>internalResponse</var> and <var>nullOrBytes</var>.
4857+
<var>response</var> and <var>nullOrBytes</var>.
48584858

48594859
<li><p>Let <var>processBodyError</var> be this step: run <var>fetchParams</var>'s
4860-
<a for="fetch params">process response consume body</a> given <var>internalResponse</var> and
4861-
failure.
4860+
<a for="fetch params">process response consume body</a> given <var>response</var> and failure.
48624861

48634862
<li><p>If <var>internalResponse</var>'s <a for=response>body</a> is null, then
48644863
<a>queue a fetch task</a> to run <var>processBody</var> given null, with <var>fetchParams</var>'s
@@ -8805,7 +8804,9 @@ particular at what stage you would like to receive a callback:
88058804
<p>To process a <a for=/>response</a> upon completion, pass an algorithm as the
88068805
<a for=fetch><i>processResponseConsumeBody</i></a> argument of <a for=/>fetch</a>. The given
88078806
algorithm is passed a <a for=/>response</a> and an argument representing the fully read
8808-
<a for=response>body</a>. The second argument's values have the following meaning:
8807+
<a for=response>body</a> (of the <a for=/>response</a>'s
8808+
<a for="filtered response">internal response</a>). The second argument's values have the following
8809+
meaning:
88098810

88108811
<dl>
88118812
<dt>null
@@ -8819,7 +8820,7 @@ particular at what stage you would like to receive a callback:
88198820
<dt>a <a>byte sequence</a>
88208821
<dd>
88218822
<p><a for=body>Fully reading</a> the contents of the <a for=/>response</a>'s
8822-
<a for=response>body</a> succeeded.
8823+
<a for="filtered response">internal response</a>'s <a for=response>body</a> succeeded.
88238824

88248825
<p class=warning>A <a>byte sequence</a> containing the full contents will be passed also for a
88258826
<a for=/>request</a> whose <a for=request>mode</a> is "<code>no-cors</code>". Callers have to
@@ -8954,6 +8955,7 @@ Adam Barth,
89548955
Adam Lavin,
89558956
Alan Jeffrey,
89568957
Alexey Proskuryakov,
8958+
Andreas Kling,
89578959
Andrés Gutiérrez,
89588960
Andrew Sutherland,
89598961
Ángel González,

0 commit comments

Comments
 (0)