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:
beforeRequestSent
for URL AresponseStarted
for URL AbeforeRequestSent
for URL BresponseStarted
for URL BresponseCompleted
for URL AresponseCompleted
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 AresponseStarted
for URL AresponseCompleted
for URL AbeforeRequestSent
for URL BresponseStarted
for URL BresponseCompleted
for URL B
Reporter | ||
Comment 1•8 months 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•8 months ago
|
||
For the record here's a possible way to fix it: https://treeherder.mozilla.org/jobs?repo=try&revision=c92cdc8165fdf0ec86eb5036bccce5a2381cf58f
Reporter | ||
Updated•8 months ago
|
Reporter | ||
Comment 3•7 months 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•7 months ago
|
||
For reference, this blocks the puppeteer test "network Network Events Page.Events.RequestServedFromCache"
Reporter | ||
Updated•7 months ago
|
Reporter | ||
Updated•6 months ago
|
Reporter | ||
Updated•6 months ago
|
Assignee | ||
Updated•4 months ago
|
Assignee | ||
Comment 5•4 months ago
|
||
Assignee | ||
Comment 6•4 months ago
|
||
Comment 9•4 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f36e3ba36bca
https://hg.mozilla.org/mozilla-central/rev/e4d8c448e836
Updated•3 months ago
|
Description
•