Wrong event order of network.responseCompleted for redirects
Categories
(Remote Protocol :: WebDriver BiDi, defect, P2)
Tracking
(firefox128 fixed)
| 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:
beforeRequestSentfor URL AresponseStartedfor URL AbeforeRequestSentfor URL BresponseStartedfor URL BresponseCompletedfor URL AresponseCompletedfor 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:
beforeRequestSentfor URL AresponseStartedfor URL AresponseCompletedfor URL AbeforeRequestSentfor URL BresponseStartedfor URL BresponseCompletedfor URL B
| Reporter | ||
Comment 1•2 years ago
|
||
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.
| Reporter | ||
Comment 2•2 years ago
|
||
For the record here's a possible way to fix it: https://treeherder.mozilla.org/jobs?repo=try&revision=c92cdc8165fdf0ec86eb5036bccce5a2381cf58f
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Comment 3•2 years ago
|
||
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.
| Reporter | ||
Comment 4•2 years ago
|
||
For reference, this blocks the puppeteer test "network Network Events Page.Events.RequestServedFromCache"
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Updated•2 years ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 5•1 year ago
|
||
| Assignee | ||
Comment 6•1 year ago
|
||
Comment 9•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f36e3ba36bca
https://hg.mozilla.org/mozilla-central/rev/e4d8c448e836
Updated•1 year ago
|
Description
•