From e1e956769b57c109e52894c67247b083298234f7 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Wed, 25 Jan 2023 15:06:21 +0200 Subject: [PATCH] Body sizes should be CORS rather than TAO protected The encoded/decoded body size relate to the resource, not to the timing. Tests: https://github.com/web-platform-tests/wpt/pull/37884 & https://github.com/web-platform-tests/wpt/pull/37257. This is part of https://github.com/w3c/resource-timing/issues/220#issuecomment-1177615190. Co-authored-by: Anne van Kesteren --- fetch.bs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/fetch.bs b/fetch.bs index 7e24ae7c3..9f0fad20f 100644 --- a/fetch.bs +++ b/fetch.bs @@ -2396,7 +2396,8 @@ this is also tracked internally using the request's timing allow

A network error is a response whose type is "error", status is 0, status message is the empty byte sequence, -header list is « », and body is null. +header list is « », body is null, and +body info is a new response body info.

An aborted network error is a network error whose aborted flag is set. @@ -2467,8 +2468,9 @@ of defining the concrete types of filtered responses.) URL list is « », status is 0, status message is the empty byte sequence, -header list is « », and -body is null. +header list is « », +body is null, and +body info is a new response body info.

An opaque-redirect filtered response @@ -2476,8 +2478,9 @@ is a filtered response whose type is "opaqueredirect", status is 0, status message is the empty byte sequence, -header list is « », and -body is null. +header list is « », +body is null, and +body info is a new response body info.

Exposing the URL list for @@ -4696,8 +4699,7 @@ steps:

  • If response's timing allow passed flag is not set, then set timingInfo to the result of creating an opaque timing info for - timingInfo, set bodyInfo to a new response body info, and - set cacheState to the empty string. + timingInfo and set cacheState to the empty string.

    This covers the case of response being a network error.