Skip to content

Commit

Permalink
Use boolean for algo
Browse files Browse the repository at this point in the history
  • Loading branch information
noamr committed May 8, 2023
1 parent c267d4e commit f64322a
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2850,7 +2850,7 @@ steps:
<a>connection</a>.
</ol>

<li><p>Let <var>proxies</var> of calling <a>resolve proxies</a> given <var>url</var>.
<li><p>Let <var>proxies</var> be the result of calling <a>resolve proxies</a> given <var>url</var>.

<li><p>Let <var>timingInfo</var> be a new <a for=/>connection timing info</a>.

Expand Down Expand Up @@ -3044,8 +3044,8 @@ boolean <var>credentials</var>, run these steps:
<var>environment</var>.

<li>
<p>Run <a>Should connection be allowed by Content Security Policy?</a> with
<var>environment</var> and <var>url</var>. If that returns <b>allowed</b>,
<p>Run <a>determine if Content Security Policy allows connection</a> with
<var>environment</var> and <var>url</var>. If that returns true,
<a>obtain a connection</a> with <var>key</var>, <var>url</var>, and <var>credentials</var>.

<p class=note>This connection is obtained but not used directly. It will remain in the
Expand All @@ -3063,7 +3063,7 @@ boolean <var>credentials</var>, run these steps:
</ol>
</div>

<div>
<div algorithm>
<p>To <dfn export>preemptively resolve an origin</dfn>, given an
<a>environment settings object</a> <var>environment</var> and a <a for=/>URL</a> <var>url</var>, run
these steps:
Expand All @@ -3072,8 +3072,8 @@ these steps:
<li><p>Let <var>key</var> be the result of <a for=/>determining the network partition key</a> given
<var>environment</var>.

<li>Run <p><a>Should connection be allowed by Content Security Policy?</a> with
<var>environment</var> and <var>url</var>. If that returns <b>blocked</b>, return.
<li>Run <p><a>determine if Content Security Policy allows connection</a> with
<var>environment</var> and <var>url</var>. If that returns false, return.

<li><p>Let <var>proxies</var> be the result of calling <a>resolve proxies</a>.

Expand All @@ -3085,18 +3085,19 @@ these steps:
</ol>
</div>

<div algorithm="check-preemptive-operation-csp">
<p>To <dfn>Should connection be allowed by Content Security Policy?</dfn>, given an
<a>environment settings object</a> <var>environment</var>, and a <a for=/>URL</a> <var>url</var>,
run these steps:
<div algorithm>
<p>To <dfn>determine if Content Security Policy allows connection</dfn>, given an
<a>environment settings object</a> <var>environment</var>, and a <a for=/>URL</a> <var>url</var>:

<ol>
<li><p>Let <var>request</var> be a <a for=/>request</a> whose <a for=request>URL</a> is
<var>url</var>, <a for=request>initiator</a> is "<code>prefetch</code>", and whose
<a for=request>client</a> is <var>environment</var>.

<li><p>Return the result of running <a>should request be blocked by Content Security Policy?</a>
given <var>request</var>.
<li><p>Let <var>result</var> be the result of running
<a>should request be blocked by Content Security Policy?</a> given <var>request</var>.

<li><p>Return true if <var>result</var> is <b>allowed</b>, otherwise false.
</ol>
</div>

Expand Down

0 comments on commit f64322a

Please sign in to comment.