Skip to content

Commit

Permalink
Editorial: move handling of request's "client" to its own steps
Browse files Browse the repository at this point in the history
  • Loading branch information
noamr authored Dec 16, 2024
1 parent 502ad76 commit c8a0408
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4279,6 +4279,8 @@ the response. [[!HTTP-CACHING]]

<li><p>Let <var>crossOriginIsolatedCapability</var> be false.

<li><p><a>Populate request from client</a> given <var>request</var>.

<li>
<p>If <var>request</var>'s <a for=request>client</a> is non-null, then:

Expand Down Expand Up @@ -4324,16 +4326,6 @@ the response. [[!HTTP-CACHING]]
<var>request</var>'s <a for=request>body</a> to <var>request</var>'s <a for=request>body</a>
<a for="byte sequence">as a body</a>.

<li><p>If <var>request</var>'s <a for=request>window</a> is "<code>client</code>", then set
<var>request</var>'s <a for=request>window</a> to <var>request</var>'s <a for=request>client</a>,
if <var>request</var>'s <a for=request>client</a>'s
<a for="environment settings object">global object</a> is a {{Window}} object; otherwise
"<code>no-window</code>".

<li><p>If <var>request</var>'s <a for=request>origin</a> is "<code>client</code>", then set
<var>request</var>'s <a for=request>origin</a> to <var>request</var>'s <a for=request>client</a>'s
<a for="environment settings object">origin</a>.

<li>
<p>If all of the following conditions are true:

Expand Down Expand Up @@ -4376,19 +4368,6 @@ the response. [[!HTTP-CACHING]]
</ol>
</li>

<li>
<p>If <var>request</var>'s <a for=request>policy container</a> is "<code>client</code>", then:

<ol>
<li><p>If <var>request</var>'s <a for=request>client</a> is non-null, then set
<var>request</var>'s <a for=request>policy container</a> to a
<a lt="clone a policy container">clone</a> of <var>request</var>'s <a for=request>client</a>'s
<a for="environment settings object">policy container</a>. [[!HTML]]

<li><p>Otherwise, set <var>request</var>'s <a for=request>policy container</a> to a new
<a for=/>policy container</a>.
</ol>

<li>
<p>If <var>request</var>'s <a for=request>header list</a>
<a for="header list">does not contain</a> `<code>Accept</code>`, then:
Expand Down Expand Up @@ -4459,6 +4438,35 @@ the response. [[!HTTP-CACHING]]
</ol>
</div>

<div algorithm>
<p>To <dfn>populate request from client</dfn> given a <a for=/>request</a> <var>request</var>:

<ol>
<li><p>If <var>request</var>'s <a for=request>window</a> is "<code>client</code>", then: set
<var>request</var>'s <a for=request>window</a> to <var>request</var>'s <a for=request>client</a>
if <var>request</var>'s <a for=request>client</a>'s
<a for="environment settings object">global object</a> is a {{Window}} object; otherwise
"<code>no-window</code>".

<li><p>If <var>request</var>'s <a for=request>origin</a> is "<code>client</code>", then set
<var>request</var>'s <a for=request>origin</a> to <var>request</var>'s <a for=request>client</a>'s
<a for="environment settings object">origin</a>.

<li>
<p>If <var>request</var>'s <a for=request>policy container</a> is "<code>client</code>":

<ol>
<li><p>If <var>request</var>'s <a for=request>client</a> is non-null, then set
<var>request</var>'s <a for=request>policy container</a> to a
<a lt="clone a policy container">clone</a> of <var>request</var>'s <a for=request>client</a>'s
<a for="environment settings object">policy container</a>. [[!HTML]]

<li><p>Otherwise, set <var>request</var>'s <a for=request>policy container</a> to a new
<a for=/>policy container</a>.
</ol>
</ol>
</div>


<h3 id=main-fetch>Main fetch</h3>

Expand Down

0 comments on commit c8a0408

Please sign in to comment.