Closed Bug 1921480 Opened 1 year ago Closed 1 year ago

Make internalRedirectTo transparent.

Categories

(Core :: Networking, task, P2)

task

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: sekim, Assigned: sekim)

References

Details

(Whiteboard: [necko-triaged][necko-priority-queue])

Attachments

(2 files)

The redirection occurs from empty.html to console.html (both are test pages from the Puppeteer test suite). Although the browser's URL bar displays "empty.html" and location.href is set to "empty.html", the page is actually constructed using the content from "console.html". This behaviour is present in Chrome.

As mentioned in Bug 1898158 Patch, the initial request is for "/webdriver/tests/bidi/network/support/empty.html?1", then we redirect (internalRedirectTo) to "/webdriver/tests/bidi/network/support/empty.html?2". The redirect from Bug 1905037 ends up loading "empty.html?2", yet we want window.location.href and URL bar to be "/webdriver/tests/bidi/network/support/empty.html?1" not "/webdriver/tests/bidi/network/support/empty.html?2".

As Kershaw mentioned, we can probably set a flag REDIRECT_TRANSPARENT instead of REDIRECT_INTERNAL, then in nsHttpHandler::AsyncOnChannelRedirect, verify if REDIRECT_TRANSPARENT is set and call OnRedirectVerifyCallback(NS_OK);. This way, we can avoid notifying the observers.

We should rename the API to transparentRedirectTo.

Assignee: nobody → sekim
Severity: -- → N/A
Depends on: 1905037, 1898158
Priority: -- → P2
Whiteboard: [necko-triaged][necko-priority-next]
Blocks: 1898158
No longer depends on: 1898158
Whiteboard: [necko-triaged][necko-priority-next] → [necko-triaged][necko-priority-queue]
Pushed by sekim@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4334a934970b Make internalRedirectTo transparent r=kershaw,jdescottes,necko-reviewers
Keywords: leave-open
Pushed by sekim@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/161a75a2d9ca transparentRedirectTo should increment internalRedirectCount not redirectCount r=kershaw,jdescottes,necko-reviewers
Keywords: leave-open
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: