Skip to content

Commit

Permalink
Editorial: add <div algorithm> to Infrastructure algorithms
Browse files Browse the repository at this point in the history
Related to #1526.
  • Loading branch information
dlrobertson authored Dec 19, 2022
1 parent 3b6fcf6 commit 84ea7db
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2999,9 +2999,9 @@ details of reused connections are not exposed and time values are coarsened.
<p>A <dfn>network partition key</dfn> is a tuple consisting of a <a for=/>site</a> and null or
an <a>implementation-defined</a> value.

<p>To
<dfn export lt="determine the network partition key|determining the network partition key">determine the network partition key</dfn>,
given an <a for=/>environment</a> <var>environment</var>, run these steps:
<div algorithm>
<p>To <dfn export>determine the network partition key</dfn>, given an
<a for=/>environment</a> <var>environment</var>:

<ol>
<li><p>Let <var>topLevelOrigin</var> be <var>environment</var>'s
Expand All @@ -3023,10 +3023,11 @@ given an <a for=/>environment</a> <var>environment</var>, run these steps:

<li><p>Return (<var>topLevelSite</var>, <var>secondKey</var>).
</ol>
</div>

<p>To
<dfn for=request lt="determine the network partition key|determining the network partition key">determine the network partition key</dfn>,
given <var>request</var>, run these steps:
<div algorithm>
<p>To <dfn for=request>determine the network partition key</dfn>, given a <a for=/>request</a>
<var>request</var>:

<ol>
<li><p>If <var>request</var>'s <a for=request>reserved client</a> is non-null, then return the
Expand All @@ -3039,13 +3040,13 @@ given <var>request</var>, run these steps:

<li><p>Return null.
</ol>
</div>


<h3 id=http-cache-partitions>HTTP cache partitions</h3>

<p>To
<dfn lt="determine the HTTP cache partition|determining the HTTP cache partition">determine the HTTP cache partition</dfn>,
given <var>request</var>, run these steps:
<div algorithm>
<p>To <dfn>determine the HTTP cache partition</dfn>, given a <a for=/>request</a> <var>request</var>:

<ol>
<li><p>Let <var>key</var> be the result of <a for=request>determining the network partition key</a>
Expand All @@ -3055,6 +3056,7 @@ given <var>request</var>, run these steps:

<li><p>Return the unique HTTP cache associated with <var>key</var>. [[!HTTP-CACHING]]
</ol>
</div>


<h3 id=port-blocking>Port blocking</h3>
Expand All @@ -3063,9 +3065,9 @@ given <var>request</var>, run these steps:
through TLS using ALPN. The protocol cannot be spoofed through HTTP requests in that case.
[[RFC7301]]

<div algorithm>
<p>To determine whether fetching a <a for=/>request</a> <var>request</var>
<dfn export lt="block bad port">should be blocked due to a bad port</dfn>,
run these steps:
<dfn export lt="block bad port">should be blocked due to a bad port</dfn>:

<ol>
<li><p>Let <var>url</var> be <var>request</var>'s <a for=request>current URL</a>.
Expand All @@ -3075,6 +3077,7 @@ run these steps:

<li><p>Return <b>allowed</b>.
</ol>
</div>

<p>A <a for=url>port</a> is a
<dfn export>bad port</dfn> if it is listed in the first column of the following table.
Expand Down Expand Up @@ -3166,6 +3169,7 @@ run these steps:
https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt -->


<div algorithm="should response to request be blocked due to mime type">
<h3 dfn export lt="should response to request be blocked due to mime type" id=should-response-to-request-be-blocked-due-to-mime-type?>Should
<var>response</var> to <var>request</var> be blocked due to its MIME type?</h3>

Expand All @@ -3191,6 +3195,7 @@ run these steps:

<li><p>Return <b>allowed</b>.
</ol>
</div>



Expand Down

0 comments on commit 84ea7db

Please sign in to comment.