@@ -4096,6 +4096,7 @@ a <a for=/>request</a> and one or more algorithms to run at various points durin
40964096<a for=/>response</a> is passed to the last two algorithms listed below. The first two algorithms
40974097can be used to capture uploads.
40984098
4099+ <div algorithm="fetch">
40994100<p> To <dfn export id=concept-fetch>fetch</dfn> , given a <a for=/>request</a> <var> request</var> , an
41004101optional algorithm
41014102<dfn export for=fetch id=process-request-body><var>processRequestBodyChunkLength</var></dfn> , an
@@ -4310,10 +4311,12 @@ the response. [[!HTTP-CACHING]]
43104311
43114312 <li><p> Return <var> fetchParams</var> 's <a for="fetch params">controller</a> .
43124313</ol>
4314+ </div>
43134315
43144316
43154317<h3 id=main-fetch>Main fetch</h3>
43164318
4319+ <div algorithm>
43174320<p> To <dfn id=concept-main-fetch>main fetch</dfn> , given a <a for=/>fetch params</a>
43184321<var> fetchParams</var> and an optional boolean <var> recursive</var> (default false), run these
43194322steps:
@@ -4611,9 +4614,11 @@ steps:
46114614 <li><p> Otherwise, run <a>fetch response handover</a> given <var> fetchParams</var> and
46124615 <var> response</var> .
46134616</ol>
4617+ </div>
46144618
46154619<hr>
46164620
4621+ <div algorithm>
46174622<p> The <dfn id=fetch-finale>fetch response handover</dfn> , given a <a for=/>fetch params</a>
46184623<var> fetchParams</var> and a <a for=/>response</a> <var> response</var> , run these steps:
46194624
@@ -4678,9 +4683,9 @@ steps:
46784683 <var> response</var> 's <a for=response>status</a> .
46794684
46804685 <li><p> If <var> fetchParams</var> 's <a for="fetch params">request</a>' s
4681- <a for=request>initiator type</a> is non-null, then
4682- <a for=/>mark resource timing</a> given <var> timingInfo </var> , <var > request</var > 's
4683- <a for=request>URL</a> , <a for="fetch params">request</a> 's
4686+ <a for=request>initiator type</a> is non-null, then <a for=/>mark resource timing</a> given
4687+ <var> timingInfo </var> , <var> fetchParams </var> 's <a for="fetch params" >request</a >' s
4688+ <a for=request>URL</a> , <var> fetchParams </var> 's < a for="fetch params">request</a>' s
46844689 <a for=request>initiator type</a> , <var> global</var> , <var> cacheState</var> ,
46854690 <var> bodyInfo</var> , and <var> responseStatus</var> .
46864691 </ol>
@@ -4763,9 +4768,12 @@ steps:
47634768 <a for="fetch params">task destination</a> .
47644769 </ol>
47654770</ol>
4771+ </div>
4772+
47664773
47674774<h3 id=scheme-fetch oldids=basic-fetch>Scheme fetch</h3>
47684775
4776+ <div algorithm>
47694777<p> To <dfn id=concept-scheme-fetch oldids=concept-basic-fetch>scheme fetch</dfn> , given a
47704778<a for=/>fetch params</a> <var> fetchParams</var> :
47714779
@@ -4854,10 +4862,12 @@ steps:
48544862
48554863 <li><p> Return a <a for=/>network error</a> .
48564864</ol>
4865+ </div>
48574866
48584867
48594868<h3 id=http-fetch>HTTP fetch</h3>
48604869
4870+ <div algorithm>
48614871<p> To <dfn export id=concept-http-fetch>HTTP fetch</dfn> , given a <a for=/>fetch params</a>
48624872<var> fetchParams</var> and an optional boolean <var> makeCORSPreflight</var> (default false), run
48634873these steps:
@@ -5064,10 +5074,12 @@ these steps:
50645074 <a for=response>body</a> 's <a for=body>stream</a> is still being enqueued to after
50655075 returning.</span>
50665076</ol>
5077+ </div>
50675078
50685079
50695080<h3 id=http-redirect-fetch>HTTP-redirect fetch</h3>
50705081
5082+ <div algorithm>
50715083<p> To <dfn export id=concept-http-redirect-fetch>HTTP-redirect fetch</dfn> , given a
50725084<a for=/>fetch params</a> <var> fetchParams</var> and a <a for=/>response</a> <var> response</var> ,
50735085run these steps:
@@ -5172,10 +5184,12 @@ run these steps:
51725184 <p class=note> This has to invoke <a>main fetch</a> to get <var> request</var> 's
51735185 <a for=request>response tainting</a> correct.
51745186</ol>
5187+ </div>
51755188
51765189
51775190<h3 id=http-network-or-cache-fetch>HTTP-network-or-cache fetch</h3>
51785191
5192+ <div algorithm>
51795193<p> To <dfn id=concept-http-network-or-cache-fetch>HTTP-network-or-cache fetch</dfn> , given a
51805194<a for=/>fetch params</a> <var> fetchParams</var> , an optional boolean
51815195<var> isAuthenticationFetch</var> (default false), and an optional boolean
@@ -5698,10 +5712,12 @@ run these steps:
56985712 <a for=response>body</a> 's <a for=body>stream</a> is still being enqueued to after
56995713 returning.</span>
57005714</ol>
5715+ </div>
57015716
57025717
57035718<h3 id=http-network-fetch>HTTP-network fetch</h3>
57045719
5720+ <div algorithm>
57055721<p> To <dfn id=concept-http-network-fetch>HTTP-network fetch</dfn> , given a <a for=/>fetch params</a>
57065722<var> fetchParams</var> , an optional boolean <var> includeCredentials</var> (default false), and an
57075723optional boolean <var> forceNewConnection</var> (default false), run these steps:
@@ -5942,7 +5958,7 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
59425958 <a href=https://httpwg.org/specs/rfc6265.html#privacy-considerations>section 7</a> of
59435959 [[!COOKIES]] ), then run the "set-cookie-string" parsing algorithm (see
59445960 <a href=https://httpwg.org/specs/rfc6265.html#set-cookie>section 5.2</a> of [[!COOKIES]] ) on the
5945- <a for=header>value</a> of each <var > header</var > whose <a for=header>name</a> is a
5961+ <a for=header>value</a> of each <a for=/ >header</a > whose <a for=header>name</a> is a
59465962 <a>byte-case-insensitive</a> match for `<code> Set-Cookie</code> ` in <var> response</var> 's
59475963 <a for=response>header list</a> , if any, and <var> request</var> 's <a for=request>current URL</a> .
59485964
@@ -6046,6 +6062,7 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
60466062 <a for=response>body</a> 's <a for=body>stream</a> is still being enqueued to after
60476063 returning.</span>
60486064</ol>
6065+ </div>
60496066
60506067
60516068<h3 id=cors-preflight-fetch>CORS-preflight fetch</h3>
@@ -6055,6 +6072,7 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
60556072populates the <a>CORS-preflight cache</a> to minimize the number of these
60566073<a lt="CORS-preflight fetch">fetches</a> .
60576074
6075+ <div algorithm>
60586076<p> To <dfn id=cors-preflight-fetch-0>CORS-preflight fetch</dfn> , given a <a for=/>request</a>
60596077<var> request</var> , run these steps:
60606078
@@ -6183,6 +6201,7 @@ populates the <a>CORS-preflight cache</a> to minimize the number of these
61836201
61846202 <li><p> Otherwise, return a <a>network error</a> .
61856203</ol>
6204+ </div>
61866205
61876206
61886207<h3 id=cors-preflight-cache>CORS-preflight cache</h3>
@@ -6209,6 +6228,7 @@ populates the <a>CORS-preflight cache</a> to minimize the number of these
62096228<a for="cache entry">max-age</a> field have passed since storing the entry. <a>Cache entries</a> may
62106229be removed before that moment arrives.
62116230
6231+ <div algorithm>
62126232<p> To <dfn id=concept-cache-create-entry>create a new cache entry</dfn> , given <var> request</var> ,
62136233<var> max-age</var> , <var> method</var> , and <var> headerName</var> , run these steps:
62146234
@@ -6243,6 +6263,7 @@ be removed before that moment arrives.
62436263
62446264 <li><p> <a for=list>Append</a> <var> entry</var> to the user agent's <a>CORS-preflight cache</a> .
62456265</ol>
6266+ </div>
62466267
62476268<p> To <dfn id=concept-cache-clear>clear cache entries</dfn> , given a <var> request</var> ,
62486269<a for=list>remove</a> any <a>cache entries</a> in the user agent's <a>CORS-preflight cache</a>
@@ -6289,6 +6310,7 @@ agent's <a>CORS-preflight cache</a> for which there is a <a>cache entry match</a
62896310
62906311<h3 id=cors-check>CORS check</h3>
62916312
6313+ <div algorithm>
62926314<p> To perform a <dfn id=concept-cors-check>CORS check</dfn> for a <var> request</var> and
62936315<var> response</var> , run these steps:
62946316
@@ -6319,10 +6341,12 @@ agent's <a>CORS-preflight cache</a> for which there is a <a>cache entry match</a
63196341
63206342 <li><p> Return failure.
63216343</ol>
6344+ </div>
63226345
63236346
63246347<h3 id=tao-check>TAO check</h3>
63256348
6349+ <div algorithm>
63266350<p> To perform a <dfn id=concept-tao-check>TAO check</dfn> for a <var> request</var> and
63276351<var> response</var> , run these steps:
63286352
@@ -6355,6 +6379,7 @@ agent's <a>CORS-preflight cache</a> for which there is a <a>cache entry match</a
63556379
63566380 <li><p> Return failure.
63576381</ol>
6382+ </div>
63586383
63596384
63606385
0 commit comments