Closed Bug 1879580 Opened 8 months ago Closed 4 months ago

Wrong event order of network.responseCompleted for redirects

Categories

(Remote Protocol :: WebDriver BiDi, defect, P2)

defect
Points:
3

Tracking

(firefox128 fixed)

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: jdescottes, Assigned: Sasha)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [webdriver:m11], [wptsync upstream][webdriver:relnote])

Attachments

(2 files)

When request to URL A redirects to URL B, we currently have the following event order:

  • beforeRequestSent for URL A
  • responseStarted for URL A
  • beforeRequestSent for URL B
  • responseStarted for URL B
  • responseCompleted for URL A
  • responseCompleted for URL B

However, according to step 6 of https://whatpr.org/fetch/1540.html#concept-http-fetch, we should emit responseCompleted for URL A before we start the redirected request. So the expected event order should be:

  • beforeRequestSent for URL A
  • responseStarted for URL A
  • responseCompleted for URL A
  • beforeRequestSent for URL B
  • responseStarted for URL B
  • responseCompleted for URL B

Technically speaking, we are emitting responseCompleted when the input stream for the response is closed, and this will only happen when the response of the redirected request is received. However, we can detect that we have a redirect and force to emit responseCompleted earlier.

Severity: -- → S3
Points: --- → 2
Priority: -- → P2
Whiteboard: [webdriver:m10]

Increasing to 3 points because even though my patch on try works, it's not compatible with multiple sessions. A proper solution will require more work.

Points: 2 → 3

For reference, this blocks the puppeteer test "network Network Events Page.Events.RequestServedFromCache"

Whiteboard: [webdriver:m10] → [webdriver:m11]
Priority: P2 → P3
Priority: P3 → P2
Assignee: nobody → aborovova
Status: NEW → ASSIGNED
Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f36e3ba36bca [bidi] Force event order of network.responseCompleted for redirects. r=webdriver-reviewers,jdescottes https://hg.mozilla.org/integration/autoland/rev/e4d8c448e836 [wdspec] Add test for order of the network events in case of redirect. r=webdriver-reviewers,jdescottes
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/46635 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m11] → [webdriver:m11], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
Upstream PR merged by moz-wptsync-bot
Whiteboard: [webdriver:m11], [wptsync upstream] → [webdriver:m11], [wptsync upstream][webdriver:relnote]
Duplicate of this bug: 1809210
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: