From 5df348c5385196e94304982027aeab3f3f945c45 Mon Sep 17 00:00:00 2001 From: James Graham Date: Fri, 18 Nov 2022 10:20:40 +0000 Subject: [PATCH] Add WebDriver BiDi network request logging --- fetch.bs | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/fetch.bs b/fetch.bs index e8a2d201..5f71fa24 100644 --- a/fetch.bs +++ b/fetch.bs @@ -110,6 +110,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" } } @@ -2123,6 +2129,11 @@ Unless stated otherwise, it is false.

This is for exclusive use by HTML's navigate algorithm. [[!HTML]] +

A request has an associated navigation +id (a string). Unless stated otherwise, it is null. + +

This is for exclusive use by HTML's navigate algorithm. [[!HTML]] +

A request has an associated boolean render-blocking. Unless stated otherwise, it is false. @@ -2164,6 +2175,15 @@ otherwise, it is unset. done flag, and timing allow failed flag are used as bookkeeping details by the fetch algorithm. +

A request has an associated +request id which is a unique +string automatically set when the request is created. + +Note: the [=request/request id=] is used by WebDriver-BiDi. It remains constant +across all requests resulting from a redirect of an initial request. When a +request is [=request/cloned=], the created request gets a unique +[=request/request id=]. [[!WEBDRIVER-BIDI]] +


A subresource request is a request @@ -2240,7 +2260,7 @@ is to return the result of serializing a request origin with request

  1. Let newRequest be a copy of request, except for its - body. + body and request id.

  2. If request's body is non-null, set newRequest's body to the result of cloning request's @@ -4779,6 +4799,11 @@ steps: URL, fetchParams's request's initiator type, global, cacheState, bodyInfo, and responseStatus. + +

  3. If response is a network error, run + the WebDriver BiDi fetch error steps with request. Otherwise + run the WebDriver BiDi response completed steps with + request and response.

  • @@ -5129,6 +5154,13 @@ these steps: filtered response; otherwise to response's internal response. + +
  • Run the [=WebDriver BiDi response started=] steps with + request and response. +

  • If one of the following is true @@ -5663,6 +5695,10 @@ run these steps:

    This intentionally does not depend on httpRequest's credentials mode. + +

  • Run the WebDriver BiDi before request sent steps with request. +

  • Set httpCache to the result of determining the HTTP cache partition, given httpRequest. @@ -5758,6 +5794,8 @@ run these steps:

  • If aborted, then return the appropriate network error for fetchParams. +

  • If response is not null, run the WebDriver BiDi response + started steps with request and response.

  • @@ -6021,6 +6059,9 @@ optional boolean forceNewConnection (default false), run these steps:
  • Wait until all the HTTP response headers are transmitted. +

  • Run the [=WebDriver BiDi response started=] steps with + |request| and |response|. +

  • Let status be the HTTP response's status code.