@@ -50,7 +50,8 @@ <h2 class="no-num no-toc" id="table-of-contents">Table of Contents</h2>
5050 < li > < a href ="#bodies "> < span class ="secno "> 2.1.3 </ span > Bodies</ a > </ li >
5151 < li > < a href ="#requests "> < span class ="secno "> 2.1.4 </ span > Requests</ a > </ li >
5252 < li > < a href ="#responses "> < span class ="secno "> 2.1.5 </ span > Responses</ a > </ ul > </ li >
53- < li > < a href ="#authentication-entries "> < span class ="secno "> 2.2 </ span > Authentication entries</ a > </ ul > </ li >
53+ < li > < a href ="#authentication-entries "> < span class ="secno "> 2.2 </ span > Authentication entries</ a > </ li >
54+ < li > < a href ="#fetch-registries "> < span class ="secno "> 2.3 </ span > Fetch registries</ a > </ ul > </ li >
5455 < li > < a href ="#http-extensions "> < span class ="secno "> 3 </ span > HTTP extensions</ a >
5556 < ul class ="toc ">
5657 < li > < a href ="#origin-header "> < span class ="secno "> 3.1 </ span > `< code title =""> Origin</ code > ` header</ a > </ li >
@@ -184,6 +185,16 @@ <h2 id="infrastructure"><span class="secno">2 </span>Infrastructure</h2>
184185 < a class ="external " href ="https://html.spec.whatwg.org/multipage/webappapis.html#networking-task-source "> networking task source</ a > .
185186</ ol >
186187
188+ < p > To < dfn id ="queue-a-fetch-done-task "> queue a fetch done task</ dfn > given a < var title =""> request</ var > and
189+ < var title =""> response</ var > , run these steps:
190+
191+ < ol >
192+ < li > < p > Set < var title =""> request</ var > 's < a href ="#done-flag "> done flag</ a > .
193+
194+ < li > < p > < a href ="#queue-a-fetch-task "> Queue a fetch task</ a > on < var title =""> request</ var > to
195+ < dfn id ="process-response-end-of-file "> process response end-of-file</ dfn > for < var title =""> response</ var > .
196+ </ ol >
197+
187198
188199< h3 id ="http "> < span class ="secno "> 2.1 </ span > HTTP</ h3 >
189200
@@ -468,6 +479,13 @@ <h4 id="requests"><span class="secno">2.1.4 </span>Requests</h4>
468479null when < a class ="external " href ="https://html.spec.whatwg.org/multipage/browsers.html#navigate " title ="navigate "> navigating</ a > , service worker
469480script updates, etc.</ span >
470481
482+ < p > A < a href ="#concept-request " title ="concept-request "> request</ a > has an associated
483+ < dfn id ="keep-alive-flag "> keep-alive flag</ dfn > . Unless stated otherwise it is unset.
484+
485+ < p class ="note no-backref "> This is used by < code > navigator.sendBeacon</ code > and the HTML
486+ < code > img</ code > element to outlive the
487+ < a class ="external " href ="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object "> environment settings object</ a > .
488+
471489< p > A < a href ="#concept-request " title ="concept-request "> request</ a > has an associated
472490< dfn id ="skip-service-worker-flag "> skip service worker flag</ dfn > . Unless stated otherwise it is unset.
473491
@@ -827,12 +845,16 @@ <h4 id="requests"><span class="secno">2.1.4 </span>Requests</h4>
827845"< code title =""> basic</ code > ", "< code title =""> cors</ code > ", and "< code title =""> opaque</ code > ".
828846Unless stated otherwise, it is "< code title =""> basic</ code > ".
829847
848+ < p > A < a href ="#concept-request " title ="concept-request "> request</ a > has an associated < dfn id ="done-flag "> done flag</ dfn > .
849+ Unless stated otherwise, it is unset.
850+
830851< p class ="note no-backref "> A < a href ="#concept-request " title ="concept-request "> request</ a > 's
831852< a href ="#concept-request-url-list " title ="concept-request-url-list "> url list</ a > ,
832853< a href ="#concept-request-current-url " title ="concept-request-current-url "> current url</ a > ,
833- < a href ="#concept-request-redirect-count " title ="concept-request-redirect-count "> redirect count</ a > , and
834- < a href ="#concept-request-response-tainting " title ="concept-request-response-tainting "> response tainting</ a > are used as
835- bookkeeping details by the < a href ="#concept-fetch " title ="concept-fetch "> fetch</ a > algorithm.
854+ < a href ="#concept-request-redirect-count " title ="concept-request-redirect-count "> redirect count</ a > ,
855+ < a href ="#concept-request-response-tainting " title ="concept-request-response-tainting "> response tainting</ a > , and
856+ < a href ="#done-flag "> done flag</ a > are used as bookkeeping details by the
857+ < a href ="#concept-fetch " title ="concept-fetch "> fetch</ a > algorithm.
836858
837859< hr >
838860
@@ -1038,6 +1060,34 @@ <h3 id="authentication-entries"><span class="secno">2.2 </span>Authentication en
10381060< a href ="#refsHTTPAUTH "> [HTTPAUTH]</ a >
10391061
10401062
1063+ < h3 id ="fetch-registries "> < span class ="secno "> 2.3 </ span > Fetch registries</ h3 >
1064+
1065+ < p > Each < a class ="external " href ="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object "> environment settings object</ a > has an associated
1066+ < dfn id ="concept-fetch-registry " title ="concept-fetch-registry "> fetch registry</ dfn > .
1067+
1068+ < p > A < a href ="#concept-fetch-registry " title ="concept-fetch-registry "> fetch registry</ a > holds an ordered list of
1069+ < dfn id ="concept-fetch-record " title ="concept-fetch-record "> fetch records</ dfn > .
1070+
1071+ < p > A < a href ="#concept-fetch-record " title ="concept-fetch-record "> fetch record</ a > has an associated
1072+ < dfn id ="concept-fetch-record-request " title ="concept-fetch-record-request "> request</ dfn > (a
1073+ < a href ="#concept-request " title ="concept-request "> request</ a > ).
1074+
1075+ < p > A < a href ="#concept-fetch-record " title ="concept-fetch-record "> fetch record</ a > has an associated
1076+ < dfn id ="concept-fetch-record-fetch " title ="concept-fetch-record-fetch "> fetch</ dfn > (a
1077+ < a href ="#concept-fetch " title ="concept-fetch "> fetch</ a > algorithm or null).
1078+
1079+ < hr >
1080+
1081+ < p > When a < a href ="#concept-fetch-registry " title ="concept-fetch-registry "> fetch registry</ a > is
1082+ < dfn id ="concept-fetch-registry-terminate " title ="concept-fetch-registry-terminate "> terminated</ dfn > , for each associated
1083+ < a href ="#concept-fetch-record " title ="concept-fetch-record "> fetch record</ a > whose
1084+ < span title ="concept-request-record-request "> request</ span > 's < a href ="#done-flag "> done flag</ a > or
1085+ < a href ="#keep-alive-flag "> keep-alive flag</ a > is unset,
1086+ < a href ="#concept-fetch-terminate " title ="concept-fetch-terminate "> terminate</ a > the
1087+ < a href ="#concept-fetch-record " title ="concept-fetch-record "> fetch record</ a > 's
1088+ < a href ="#concept-fetch-record-fetch " title ="concept-fetch-record-fetch "> fetch</ a > with reason < i title =""> fatal</ i > .
1089+
1090+
10411091
10421092< h2 id ="http-extensions "> < span class ="secno "> 3 </ span > HTTP extensions</ h2 >
10431093
@@ -1357,6 +1407,22 @@ <h2 id="fetching"><span class="secno">4 </span>Fetching</h2>
13571407 for HTTP/2, and equivalent information used to prioritize dispatch and processing of
13581408 HTTP/1 fetches.
13591409
1410+ < li >
1411+ < p > If < var title =""> request</ var > 's < a href ="#concept-request-client " title ="concept-request-client "> client</ a > is
1412+ non-null, run these substeps:
1413+
1414+ < ol >
1415+ < li > < p > Let < var title =""> record</ var > be a new
1416+ < a href ="#concept-fetch-record " title ="concept-fetch-record "> fetch record</ a > consisting of
1417+ < var title =""> request</ var > and this instance of the
1418+ < a href ="#concept-fetch " title ="concept-fetch "> fetch</ a > algorithm.
1419+
1420+ < li > < p > Append < var title =""> record</ var > to < var title =""> request</ var > 's
1421+ < a href ="#concept-request-client " title ="concept-request-client "> client</ a > 's
1422+ < a href ="#concept-fetch-registry " title ="concept-fetch-registry "> fetch registry</ a > list of
1423+ < a href ="#concept-fetch-record " title ="concept-fetch-record "> fetch records</ a > .
1424+ </ ol >
1425+
13601426 < li > < p > Return the result of performing a < a href ="#concept-main-fetch " title ="concept-main-fetch "> main fetch</ a >
13611427 using < var title =""> request</ var > .
13621428</ ol >
@@ -1565,8 +1631,8 @@ <h3 id="main-fetch"><span class="secno">4.1 </span>Main fetch</h3>
15651631 < li > < a href ="#queue-a-fetch-task "> Queue a fetch task</ a > on < var title =""> request</ var > to
15661632 < dfn id ="process-response-body "> process response body</ dfn > for < var title =""> response</ var > .
15671633
1568- < li > < p > < a href ="#queue-a-fetch-task "> Queue a fetch task</ a > on < var title =""> request</ var > to
1569- < dfn id =" process-response-end-of-file " > process response end-of-file </ dfn > for < var title =""> response</ var > .
1634+ < li > < p > < a href ="#queue-a-fetch-done- task "> Queue a fetch done task</ a > using < var title =""> request</ var > and
1635+ < var title =""> response</ var > .
15701636 </ ol >
15711637
15721638 < li >
@@ -1586,15 +1652,12 @@ <h3 id="main-fetch"><span class="secno">4.1 </span>Main fetch</h3>
15861652 < p > Once end-of-file has been pushed to < var title =""> response</ var > 's
15871653 < a href ="#concept-response-body " title ="concept-response-body "> body</ a > or < var title =""> response</ var > has a
15881654 < a href ="#concept-response-termination-reason " title ="concept-response-termination-reason "> termination reason</ a > ,
1589- < a href ="#queue-a-fetch-task "> queue a fetch task</ a > on < var title =""> request</ var > to
1590- < a href =" #process-response-end-of-file " > process response end-of-file </ a > for < var title =""> response</ var > .
1655+ < a href ="#queue-a-fetch-done- task "> queue a fetch done task</ a > using < var title =""> request</ var > and
1656+ < var title =""> response</ var > .
15911657
15921658 < p class ="note "> Ideally FTP/HTTP define this in more detail and this becomes a set of
15931659 simple hooks.
15941660 </ ol >
1595-
1596- < p > Use the < a class ="external " href ="https://html.spec.whatwg.org/multipage/webappapis.html#networking-task-source "> networking task source</ a > for these
1597- < a class ="external " href ="https://html.spec.whatwg.org/multipage/webappapis.html#concept-task " title ="concept-task "> tasks</ a > .
15981661</ ol >
15991662
16001663
0 commit comments