Skip to content

Commit

Permalink
Minor fixes for network intercept PR (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliandescottes authored Aug 18, 2023
1 parent 21b25a4 commit 64c2dc7
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3603,11 +3603,11 @@ To <dfn>get the network intercepts</dfn> given |session|, |event|, and |request|
1. Run the steps under the first matching condition:
<dl>
<dt>|event| is "<code>network.beforeRequestSent</code>"
<dd>Set |phase| to the <code>beforeRequestSent</code>
<dd>Set |phase| to the "<code>beforeRequestSent</code>".
<dt>|event| is "<code>network.responseStarted</code>"
<dd>Set |phase| to "<code>responseStarted</code>".
<dt>|event| is "<code>network.authRequired</code>"
<dd>Set |phase| to "<code>authRequired</code>"».
<dd>Set |phase| to "<code>authRequired</code>".
<dt>|event| is "<code>network.responseCompleted</code>"
<dd>Return |intercepts|.
</dl>
Expand Down Expand Up @@ -4689,7 +4689,7 @@ To <dfn>parse URL pattern</dfn>, given |pattern|:

1. The empty string.

1. Otherwise, if |url|'s [=url/port=], is not null:
1. Otherwise, if |url|'s [=url/port=] is not null:

1. [=Serialize an integer=] with |url|'s [=url/port=].

Expand Down Expand Up @@ -4936,7 +4936,7 @@ The [=remote end steps=] given |session| and |command parameters| are:
The <dfn export for=commands>network.continueResponse</dfn> command continues a
response that's blocked by a [=network intercept=]. It can be called in the
<code>responseStarted</code> phase, to modify the status and headers of the
response, but still provide the netowrk response body.
response, but still provide the network response body.

<dl>
<dt>Command Type</dt>
Expand Down Expand Up @@ -4975,8 +4975,6 @@ To <dfn>update the response</dfn> given |session|, |command| and |command parame
1. If |blocked requests| does not [=map/contain=] |request id| then return
[=error=] with [=error code=] [=no such request=].

Issue: consider a "<code>no such request</code>" error.

1. Let (<var ignore>request</var>, |phase|, |response|) be |blocked requests|[|request id|].

1. If |phase| is "<code>beforeRequestSent</code>" and |command| is
Expand Down Expand Up @@ -5117,8 +5115,6 @@ The [=remote end steps=] given |session| and |command parameters| are:
1. If |blocked requests| does not [=map/contain=] |request id| then return
[=error=] with [=error code=] [=no such request=].

Issue: consider a "<code>no such request</code>" error.

1. Let (<var ignore>request</var>, |phase|, |response|) be |blocked requests|[|request id|].

1. If |phase| is not "<code>authRequired</code>", then return [=error=]
Expand All @@ -5133,7 +5129,7 @@ The [=remote end steps=] given |session| and |command parameters| are:

1. Let |credentials| be |command parameters|["<code>credentials</code>"].

1. Assert: |credentials|{"<code>type</code>"] is "<code>password</code>".
1. Assert: |credentials|["<code>type</code>"] is "<code>password</code>".

1. Set |response|'s authentication credentials <!--TODO: link--> to
(|credentials|["<code>username</code>"], |credentials|["<code>password</code>"])
Expand Down Expand Up @@ -5180,9 +5176,7 @@ The [=remote end steps=] given |session| and |command parameters| are:
1. Let |request id| be |command parameters|["<code>request</code>"].

1. If |blocked requests| does not [=map/contain=] |request id| then return
[=error=] with [=error code=] [=invalid argument=].

Issue: consider a "<code>no such request</code>" error.
[=error=] with [=error code=] [=no such request=].

1. Let (<var ignore>request</var>, |phase|, <var ignore>response</var>) be
|blocked requests|[|request id|].
Expand Down

0 comments on commit 64c2dc7

Please sign in to comment.