w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
362 stars 40 forks source link

Support interception only for requests that are actually sent over the wire #792

Open OrKoN opened 3 hours ago

OrKoN commented 3 hours ago

We noticed that the current spec draft https://github.com/whatwg/fetch/pull/1540 indicates that request interception should work even if the request is handled from cache.

In Chromium, this will be difficult to support since a lot of cache handling is happening synchronously and current implementations only covers actual requests that go out to the network.

We also currently do not have a use case for intercepting already cached requests so we would like to update the draft to support interception (but not logging) only for non-cached requests that will be actually sent to the network.

Alternatively, if we allow intercepting requests that have cached responses and the user changes headers, those would not reach the server since the response has already been cached leading to confusing results.

WDYT?

@sadym-chromium @alexnj @jgraham @whimboo

whimboo commented 3 hours ago

CC @juliandescottes who knows more about the network layer in Firefox.