Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Hao <[email protected]>
  • Loading branch information
iVanlIsh and johnathan79717 authored Nov 9, 2023
1 parent 860f928 commit 56cc730
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions index.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,9 @@ <h3 id="permission-prompt">Permission Prompt</h3>
Private-Network-Access-ID: "01:23:45:67:89:0A"
</pre>

|Private-Network-Access-ID| should be a 48-bit value presented as 6
hexadecimal bytes.
|Private-Network-Access-Name| should be a valid name is a string that matches
<a http-header>`Private-Network-Access-ID`</a> should be a 48-bit value presented as 6
hexadecimal bytes separated by colons.
<a http-header>`Private-Network-Access-Name`</a> should be a valid name which is a string that matches
the [ECMAScript] regexp /^[a-z0-9_-.]+$/. 248 is the maximum number of UTF-8
code units in the name.

Expand Down Expand Up @@ -707,7 +707,7 @@ <h3 id="integration-mixed-content">Integration with Mixed Content</h3>
The [=Should fetching request be blocked as mixed content?=] is amended to add
the following condition to one of the **allowed** conditions:

1. |request|'s [=request/origin=] is a [=potentially trustworthy origin=],
1. |request|'s [=request/origin=] is not a [=potentially trustworthy origin=],
and |request|'s [=request/target IP address space=] is [=IP address
space/private=] or [=IP address space/local=].

Expand Down Expand Up @@ -761,10 +761,6 @@ <h4 id="fetching">Fetching</h4>

1. [=Request=] objects are given a new <dfn for="request" export>target IP
address space</dfn> property, initially null.

1. When fetching [=Request=] go through [[MIXED-CONTENT-2]] check, return
allow if [=target IP address space=] is [=IP address space/private=] or
[=IP address space/local=].

1. [=Response=] objects are given a new
<dfn export for="response">IP address space</dfn> property, whose value is
Expand All @@ -788,9 +784,7 @@ <h4 id="fetching">Fetching</h4>
[=request/policy container=] accordingly, or to directly set
|request|'s [=request/policy container=] to a non-null value.

1. If |request|'s [=request/origin=] is a [=potentially trustworthy
origin=] and |request|'s [=request/target IP address space=] is not
null, then:
1. If |request|'s [=request/target IP address space=] is not null, then:

1. [=Assert=]: |request|'s [=request/target IP address space=] is not
[=IP address space/public=].
Expand All @@ -799,7 +793,7 @@ <h4 id="fetching">Fetching</h4>
then |request|'s [=request/target IP address space=], then return
a [=network error=].

1. Return |error|.
1. Return null.

1. If |connection|'s [=connection/IP address space=] is
[=IP address space/less public=] than |request|'s [=request/policy
Expand Down Expand Up @@ -955,6 +949,10 @@ <h4 id="fetch-api">Fetch API</h4>

The Fetch API needs to be adjusted as well.

- Define {{IPAddressSpace}} as follows.
<pre class="idl">
enum IPAddressSpace { "private", "local" };
</pre>
- Append an optional [=map/entry=] to {{RequestInfo}}, whose [=map/key=] is
<dfn export>targetAddressSpace</dfn>, and [=map/value=] is a
{{IPAddressSpace}}.
Expand Down

0 comments on commit 56cc730

Please sign in to comment.