browsingContext.navigationStarted has the wrong URL for a http-equiv refresh "redirect"
Categories
(Remote Protocol :: WebDriver BiDi, defect, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
Details
(Whiteboard: [webdriver:backlog])
From Bug 1859299 comment 1:
While writing a test here for redirects, I noticed something unexpected when using the meta
http-equiv=refresh
in order to redirect to another page. Basically I have pageA.html which contains this meta withcontent="0;pageB.html"
. There's a first channel created to load pageA.html, and then a second one to load pageB.html. But this second channel still haspageA.html
asoriginalURI
. While I would expect this for a real redirect, I thought that for a refresh it would be set topageB.html
.
It's not entirely clear if this is intentional or not, but since we use nsIChannel.originalURI
to know what is the url for the browsingContext.navigationStarted, this leads to having the wrong url for second navigationStarted event emitted during a navigation to a page using http-equiv=refresh
.
We can use nsIChannel.URI instead. In case of http header redirects this will change as the redirection happens, but for navigationStarted it should be safe to use as long as keep ignoring the duplicate navigation-started (internal) events we get during the redirection.
A failing wdspec test should be added for this in Bug 1859299 and should pass once this is fixed.
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Comment 1•1 year ago
|
||
Henrik: you mentioned this could be related to a Puppeteer test failure about a redirect. Let me know if you find which issue this was?
Comment 2•1 year ago
|
||
Oh I thought it might have been bug 1853988 but it's not.
Comment 3•1 year ago
|
||
The severity field is not set for this bug.
:whimboo, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Description
•