Skip to content

Commit

Permalink
Clarify main fetch recursive invocation
Browse files Browse the repository at this point in the history
Spec on main fetch should clarify recursive invocation with the
discussion of a "recursive flag". Fixes #217.

PR: #218
  • Loading branch information
dlrobertson authored and annevk committed Feb 18, 2016
1 parent 8d03a91 commit 88fb8d4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
22 changes: 12 additions & 10 deletions Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<p><a class="logo" href="https://whatwg.org/"><img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-fetch.svg" width="100"></a>
<h1 id="cors">Fetch</h1>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-17-february-2016">Living Standard — Last Updated 17 February 2016</h2>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-18-february-2016">Living Standard — Last Updated 18 February 2016</h2>

<dl>
<dt>Participate:
Expand Down Expand Up @@ -1830,11 +1830,12 @@ <h2 id="fetching"><span class="secno">5 </span>Fetching</h2>

<h3 id="main-fetch"><span class="secno">5.1 </span>Main fetch</h3>

<p>To perform a <dfn id="concept-main-fetch" title="concept-main-fetch">main fetch</dfn> using
<var>request</var>, optionally with a <i title="">CORS flag</i>, run these steps:
<p>To perform a <dfn id="concept-main-fetch" title="concept-main-fetch">main fetch</dfn> using <var>request</var>, optionally
with a <i title="">CORS flag</i> and <i title="">recursive flag</i>, run these steps:

<p class="note no-backref">The <i title="">CORS flag</i> is a bookkeeping detail for handling
redirects.
<p class="note">The <i title="">recursive flag</i> is set when
<a href="#concept-main-fetch" title="concept-main-fetch">main fetch</a> is invoked recursively. The
<i title="">CORS flag</i> is a bookkeeping detail for handling redirects.

<ol>
<li><p>Let <var>response</var> be null.
Expand Down Expand Up @@ -1879,8 +1880,8 @@ <h3 id="main-fetch"><span class="secno">5.1 </span>Main fetch</h3>
<!-- Per Mike West HSTS happens "probably after" Referrer -->

<li><p>If <var>request</var>'s <a href="#synchronous-flag">synchronous flag</a> is unset and
<a href="#concept-main-fetch" title="concept-main-fetch">main fetch</a> is not invoked recursively, run the
remaining steps <a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">in parallel</a>.
<i title="">recursive flag</i> is unset, run the remaining steps
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">in parallel</a>.

<li>
<p>If <var>response</var> is null, set <var>response</var> to the value
Expand Down Expand Up @@ -1955,8 +1956,7 @@ <h3 id="main-fetch"><span class="secno">5.1 </span>Main fetch</h3>
<var>request</var> with the <i title="">CORS flag</i> set.
</dl>

<li><p>If <a href="#concept-main-fetch" title="concept-main-fetch">main fetch</a> is invoked recursively, return
<var>response</var>.
<li><p>If the <i>recursive flag</i> is set, return <var>response</var>.

<li>
<p>If <var>response</var> is not a
Expand Down Expand Up @@ -2514,7 +2514,7 @@ <h3 id="http-redirect-fetch"><span class="secno">5.4 </span>HTTP-redirect fetch<

<li>
<p>Return the result of performing a <a href="#concept-main-fetch" title="concept-main-fetch">main fetch</a> using
<var>request</var>, with the <i>CORS flag</i> set if set.
<var>request</var>, with the <i>CORS flag</i> set if set, and the <i>recursive flag</i> set.

<p class="note no-backref">This has to invoke <a href="#concept-main-fetch" title="concept-main-fetch">main fetch</a> to
get <a href="#concept-request-response-tainting" title="concept-request-response-tainting">response tainting</a> correct.
Expand Down Expand Up @@ -4783,6 +4783,7 @@ <h2 class="no-num" id="acknowledgments">Acknowledgments</h2>
Cameron McCormack,
Clement Pellerin,
Collin Jackson,
Daniel Robertson,
David Håsäther,
David Orchard,
Domenic Denicola,
Expand Down Expand Up @@ -4824,6 +4825,7 @@ <h2 class="no-num" id="acknowledgments">Acknowledgments</h2>
Lucas Gonze,
呂康豪 (Kang-Hao Lu),
Maciej Stachowiak,
Manish Goregaokar,
Marc Silbey,
Marcos Caceres,
Mark Nottingham,
Expand Down
20 changes: 11 additions & 9 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -1768,11 +1768,12 @@ <h2>Fetching</h2>

<h3>Main fetch</h3>

<p>To perform a <dfn title=concept-main-fetch>main fetch</dfn> using
<var>request</var>, optionally with a <i title>CORS flag</i>, run these steps:
<p>To perform a <dfn title=concept-main-fetch>main fetch</dfn> using <var>request</var>, optionally
with a <i title>CORS flag</i> and <i title>recursive flag</i>, run these steps:

<p class="note no-backref">The <i title>CORS flag</i> is a bookkeeping detail for handling
redirects.
<p class="note">The <i title>recursive flag</i> is set when
<span title="concept-main-fetch">main fetch</span> is invoked recursively. The
<i title>CORS flag</i> is a bookkeeping detail for handling redirects.

<ol>
<li><p>Let <var>response</var> be null.
Expand Down Expand Up @@ -1817,8 +1818,8 @@ <h3>Main fetch</h3>
<!-- Per Mike West HSTS happens "probably after" Referrer -->

<li><p>If <var>request</var>'s <span>synchronous flag</span> is unset and
<span title=concept-main-fetch>main fetch</span> is not invoked recursively, run the
remaining steps <span data-anolis-spec=html>in parallel</span>.
<i title>recursive flag</i> is unset, run the remaining steps
<span data-anolis-spec=html>in parallel</span>.

<li>
<p>If <var>response</var> is null, set <var>response</var> to the value
Expand Down Expand Up @@ -1893,8 +1894,7 @@ <h3>Main fetch</h3>
<var>request</var> with the <i title>CORS flag</i> set.
</dl>

<li><p>If <span title=concept-main-fetch>main fetch</span> is invoked recursively, return
<var>response</var>.
<li><p>If the <i>recursive flag</i> is set, return <var>response</var>.

<li>
<p>If <var>response</var> is not a
Expand Down Expand Up @@ -2452,7 +2452,7 @@ <h3>HTTP-redirect fetch</h3>

<li>
<p>Return the result of performing a <span title=concept-main-fetch>main fetch</span> using
<var>request</var>, with the <i>CORS flag</i> set if set.
<var>request</var>, with the <i>CORS flag</i> set if set, and the <i>recursive flag</i> set.

<p class="note no-backref">This has to invoke <span title=concept-main-fetch>main fetch</span> to
get <span title=concept-request-response-tainting>response tainting</span> correct.
Expand Down Expand Up @@ -4640,6 +4640,7 @@ <h2 class=no-num>Acknowledgments</h2>
Cameron McCormack,
Clement Pellerin,
Collin Jackson,
Daniel Robertson,
David H&aring;s&auml;ther,
David Orchard,
Domenic Denicola,
Expand Down Expand Up @@ -4681,6 +4682,7 @@ <h2 class=no-num>Acknowledgments</h2>
Lucas Gonze,
呂康豪 (Kang-Hao Lu),
Maciej Stachowiak,
Manish Goregaokar,
Marc Silbey,
Marcos Caceres,
Mark Nottingham,
Expand Down

0 comments on commit 88fb8d4

Please sign in to comment.