Skip to content

Commit

Permalink
Add WebDriver BiDi network request logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraham committed Jan 20, 2023
1 parent a5560d2 commit 4fa3194
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ urlPrefix:https://tc39.es/ecma262/#;type:dfn;spec:ecma-262
"href": "https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https",
"publisher": "IETF",
"title": "Service binding and parameter specification via the DNS (DNS SVCB and HTTPS RRs)"
},
"WEBDRIVER-BIDI": {
"authors": [],
"href": "https://w3c.github.io/webdriver-bidi/",
"publisher": "W3C",
"title": "WebDriver BiDi"
}
}
</pre>
Expand Down Expand Up @@ -2072,6 +2078,11 @@ Unless stated otherwise, it is false.

<p class=note>This is for exclusive use by HTML's navigate algorithm. [[!HTML]]

<p>A <a for=/>request</a> has an associated <dfn export for=request>navigation id</dfn>.
Unless stated otherwise, it is null.

<p class=note>This is for exclusive use by HTML's navigate algorithm. [[!HTML]]

<p>A <a for=/>request</a> has an associated boolean <dfn export for=request>render-blocking</dfn>.
Unless stated otherwise, it is false.

Expand Down Expand Up @@ -2113,6 +2124,13 @@ otherwise, it is unset.
<a for=request>done flag</a>, and <a for=request>timing allow failed flag</a> are used as
bookkeeping details by the <a for=/>fetch</a> algorithm.

<p>A <a for=/>request</a> has an associated
<dfn export for=request id=concept-request-id>request id</dfn> which is a unique
string automatically set when the <a for=/>request</a> is created.

Note: the [=request id=] is used by WebDriver-BiDi. When a request is [=request/cloned=],
the created request gets a unique [=request id=]. [[!WEBDRIVER-BIDI]]

<hr>

<p>A <dfn export>subresource request</dfn> is a <a for=/>request</a>
Expand Down Expand Up @@ -4712,6 +4730,11 @@ steps:
<a for=request>URL</a>, <var>fetchParams</var>'s <a for="fetch params">request</a>'s
<a for=request>initiator type</a>, <var>global</var>, <var>cacheState</var>,
<var>bodyInfo</var>, and <var>responseStatus</var>.

<li><p>If <var>response</var> is a <a>network error</a>, run
the <a>WebDriver BiDi fetch error</a> steps with <var>request</var>. Otherwise
run the <a>WebDriver BiDi response completed</a> steps with
<var>request</var> and <var>response</var>.
</ol>

<li>
Expand Down Expand Up @@ -4967,6 +4990,13 @@ these steps:
<a>filtered response</a>, and to <var>response</var>'s
<a for="filtered response">internal response</a> otherwise.

<!-- the serviceworker spec is responsible for emmitting the WebDriver BiDi
request events in this case. That's necessary to ensure that the events are
only generated if the serviceworker will handle the fetch, and to get the
correct event ordering in the case of network fallback -->
<li><p>Run the [=WebDriver BiDi response started=] steps with
<var>request</var> and <var>response</var>.

<li>
<p>If one of the following is true

Expand Down Expand Up @@ -5483,6 +5513,10 @@ run these steps:
<p class=note>This intentionally does not depend on <var>httpRequest</var>'s
<a for=request>credentials mode</a>.

<!-- After this point the request is not further modified before being either
retrieved from the cache or sent -->
<li><p>Run the <a>WebDriver BiDi before request sent</a> steps with <a>request</a>.

<li><p>Set <var>httpCache</var> to the result of <a>determining the HTTP cache partition</a>,
given <var>httpRequest</var>.

Expand Down Expand Up @@ -5578,6 +5612,8 @@ run these steps:
<li><p><a>If aborted</a>, then return the <a for=/>appropriate network error</a> for
<var>fetchParams</var>.

<li><p>If <var>response</var> is not null, run the <a>WebDriver BiDi response
started</a> steps with <var>request</var> and <var>response</var>.

<!-- If response is still null, we require a forwarded request. -->
<li>
Expand Down Expand Up @@ -5842,6 +5878,9 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:

<li><p>Wait until all the HTTP response headers are transmitted.

<li><p>Run the [=WebDriver BiDi response started=] steps with
|request| and |response|.

<li><p>Let <var>status</var> be the HTTP response's status code.

<li>
Expand Down

0 comments on commit 4fa3194

Please sign in to comment.