Closed juliandescottes closed 2 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)
This is covered in more details by #722
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.