[whatwg/fetch] Creating opaque timing info discards the end time, causing `responseEnd` to be zero after a failed TAO check (Issue #1945)

trflynn89 created an issue (whatwg/fetch#1945)

### What is the issue with the Fetch Standard?

In the [fetch response handover](https://fetch.spec.whatwg.org/#fetch-finale), we have the following report-timing steps:

```
2. Set timingInfo’s end time to the relative high resolution time given unsafeEndTime and global.
5. If response’s timing allow passed flag is not set, then set timingInfo to the result of creating an opaque timing info for timingInfo and set cacheState to the empty string. 
```

Setting the `timingInfo` to an opaque timing info wipes out the previously set end time. The result is that a Resource Timing entry that has failed the TAO check will have a positive `startTime` and a `responseEnd` of 0. However, `responseEnd` is not one of the fields that are protected by TAO here: https://w3c.github.io/resource-timing/#sec-cross-origin-resources

Should the [creating an opaque timing info](https://fetch.spec.whatwg.org/#create-an-opaque-timing-info) steps copy over the end time as well?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1945
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1945@github.com>

Received on Thursday, 6 August 2026 16:37:50 UTC