[wpt-sync] Sync PR 62515 - OOR-CORS: Avoid CorsURLLoader restart on redirect
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 62515 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62515
Details from upstream follow.
Takashi Toyoshima <toyoshim@chromium.org> wrote:
OOR-CORS: Avoid CorsURLLoader restart on redirect
CorsURLLoader previously restarted requests from scratch via
StartRequest() on redirects requiring CORS or preflights. This destroyed
the underlying URLRequest redirect history, causing Fetch Metadata
headers (e.g. Sec-Fetch-Site) to be incorrectly computed.This CL introduces base::Feature kAvoidCorsURLLoaderRestartOnRedirect
(enabled by default) to handle redirects in-place via
network_loader_->FollowRedirect() and update headers directly. If a
redirect requires a CORS preflight, CorsURLLoader runs the preflight
asynchronously without tearing down the active loader.Key changes:
- In-place redirect and preflight handling in CorsURLLoader under
kAvoidCorsURLLoaderRestartOnRedirect.- Strict validation of redirected URLs and origin permissions via
OriginAccessList for credentials and client certificates.- WHATWG Fetch compliant credential handling across cross-origin
redirects.- Parameterized test coverage for both in-place and legacy restart
paths.Bug: 513518289
Change-Id: Ic250535f64bf316df656d6cbe29e27cdbac7272a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8278433
Reviewed-by: Kenichi Ishibashi \<bashi@chromium.org>
Commit-Queue: Takashi Toyoshima \<toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1693621}
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=cc502e1f9ac1b11ea9c7618e3c793d854515c4a1
| Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 38 tests and 3 subtests
Status Summary
Firefox
OK : 33[Gecko-linux2404-64-debug] 34[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 167
TIMEOUT: 2
Chrome
OK : 1
PASS : 1
Safari
TIMEOUT: 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/cross-origin-embedder-policy/credentialless/reporting-navigation.https.window.html [wpt.fyi]:
SKIP - /html/cross-origin-embedder-policy/credentialless/reporting-subresource-corp.https.window.html [wpt.fyi]:
SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],TIMEOUT[GitHub] (Chrome:OK, Safari:TIMEOUT)- reporting-subresource-corp:
TIMEOUT(Chrome:PASS, Safari:TIMEOUT)
- reporting-subresource-corp:
- /html/cross-origin-embedder-policy/credentialless/service-worker-coep-credentialless-proxy.https.window.html [wpt.fyi]:
SKIP - /html/cross-origin-embedder-policy/credentialless/service-worker-coep-none-proxy.https.window.html [wpt.fyi]:
SKIP - /html/cross-origin-embedder-policy/credentialless/cross-origin-isolated.window.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-linux2404-64-debug]
Tests Disabled in Gecko Infrastructure
- /html/cross-origin-embedder-policy/credentialless/reporting-navigation.https.window.html [wpt.fyi]:
SKIPlinked bug:Bug 1760782 - /html/cross-origin-embedder-policy/credentialless/reporting-subresource-corp.https.window.html [wpt.fyi]:
SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],TIMEOUT[GitHub] (Chrome:OK, Safari:TIMEOUT) - /html/cross-origin-embedder-policy/credentialless/service-worker-coep-credentialless-proxy.https.window.html [wpt.fyi]:
SKIPlinked bug:Bug 1760782 - /html/cross-origin-embedder-policy/credentialless/service-worker-coep-none-proxy.https.window.html [wpt.fyi]:
SKIPlinked bug:Bug 1760782 - /html/cross-origin-embedder-policy/credentialless/cross-origin-isolated.window.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-linux2404-64-debug]
Comment 4•2 months ago
|
||
| bugherder | ||
Description
•