Re: [whatwg/fetch] Move `finalize and report timing` to controller (PR #1413)

@annevk commented on this pull request.

As I mentioned on Matrix, I think it would be good if someone else looked at this before I give it a final pass. Maybe @yutakahirano is interested?

> @@ -4766,15 +4784,7 @@ these steps:
     </dl>
     <!-- not resetting actualResponse since it's no longer used anyway -->
   </ol>
-
- <li>
-  <p>Set <var>response</var>'s <a for=response>timing info</a> to <var>timingInfo</var>.
-
-  <p class=note>Attaching the timing info to a response is what makes it exposed to the web as a
-  Resource Timing entry later. This step is done here, as resource-timing entries are available only
-  for HTTP fetches, including ones that are handled by service-workers or HTTP cache, and not for,
-  e.g., <code>data:</code>, <code>blob:</code> URL fetches, and are only available after all the
-  relevant security checks have succeeded.
+ </li>

No need to add this.

> @@ -225,8 +225,15 @@ lt="authentication entry">authentication entries</a> (for HTTP authentication).
 <a for=struct>items</a>:
 
 <dl>
- <dt><dfn for="fetch controller">state</dfn> (default "<code>ongoing</code>")
- <dd>"<code>ongoing</code>", "<code>terminated</code>", or "<code>aborted</code>"
+ <dt><dfn for="fetch controller">state</dfn> (default "<code>requesting</code>")
+ <dd>"<code>requesting</code>", "<code>responding</code>", "<code>concluded</code>",
+ "<code>terminated</code>", or "<code>aborted</code>"

No, I think the older terms were better. Fetching encompasses both.

The problem is that "responding" might finish while "requesting" is still ongoing. There's no good way to represent that unless we go with a bit field of sorts.

I think the best we can do for now is call out the limitations of this representation in a note and be very careful with what we build on top of it.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1413#pullrequestreview-969559672
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1413/review/969559672@github.com>

Received on Wednesday, 11 May 2022 15:14:05 UTC