w3c / webdriver-bidi

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

network authentication retries should each create a responseCompleted event #627

Closed juliandescottes closed 2 months ago

juliandescottes commented 9 months ago

From https://bugzilla.mozilla.org/show_bug.cgi?id=1826196#c2

When a request is blocked by authentication, each attempt to provide credentials will create new "beforeRequestSent" & "responseStarted" events (also potentially a new "authRequired" event, in case the credentials are wrong).

However, with the way BiDi is currently integrated with fetch, we only expect a single "responseCompleted" event for the whole flow. It would be nice to guarantee that we consistently get a responseCompleted event for each couple of beforeRequestSent + responseStarted event.

juliandescottes commented 9 months ago

Maybe worth noting that the webextensions WebRequest API seems to only emit a single onCompleted event in case of multiple authentication attempts (cf diagram at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest)

juliandescottes commented 2 months ago

This is covered in more details by #722