Open juliandescottes opened 5 months ago
Considering we have the following assert in responseCompleted
Assert: before request sent map[request] contains redirect count.
So even if we are fine with only emitting one event for data URIs, we will still need to update the BiDi spec to support that use case?
Chrome emits Network.requestWillBeSent and Network.responseReceived which would match network.beforeRequestSent and network.ResponseStarted/network.responseCompleted without ability to intercept.
The Browser Testing and Tools Working Group just discussed Network events for data URIs
, and agreed to the following:
ACTION: item to Aex to extract the relevant pieces from PR 565 and create a new PR [1]
At the moment, Chrome supports network events for data: URIs but not interception, and Firefox doesn't support it at all but implementation is in progress at https://bugzilla.mozilla.org/show_bug.cgi?id=1805176
From a spec point of view, our PR for the fetch spec bypasses some BiDi events in case of a data: URI, because at step 12 of Main Fetch, we will only run scheme fetch and we never go into "HTTP fetch" or "HTTP-network-or-cache fetch". This is where we normally trigger beforeRequestSent and responseStarted, so we won't get those events for a data: URI.
However we would still emit
responseCompleted
at step 3.3.9 of fetch response handover (or a fetchError...).This is convenient because we bypass the phases where we would be able to intercept the request (which probably doesn't make sense for data URI), but are we OK with only emitting
responseCompleted
for data: URI network events?cc @jgraham
@OrKoN Do you know which network events Chrome emits for a data: URI?