| Auto-Submit | +1 |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi Andrey,
PTAL. Thanks in advance for your time on this.
This patch addresses a subtle logic mismatch between `net::SchemefulSite::IsSameSite` and the network stack's origin-based Referrer policy. This was causing `Fetch.continueRequest` to fail for cross-port redirects on localhost, a scenario frequently used by automation tools.
Let me know what you think of the fix.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi Andrey,
PTAL. Thanks in advance for your time on this.
This patch addresses a subtle logic mismatch between `net::SchemefulSite::IsSameSite` and the network stack's origin-based Referrer policy. This was causing `Fetch.continueRequest` to fail for cross-port redirects on localhost, a scenario frequently used by automation tools.
Let me know what you think of the fix.
Gentle ping. No rush on this, just wanted to bring it back to your attention when you have a free moment. Thanks for your time!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
DevTools: Fix Fetch.continueRequest for localhost cross-port redirects
Using `Fetch.continueRequest` to redirect a request to a different
port on localhost would fail with ERR_BLOCKED_BY_CLIENT if the
initiator's URL contained a path or query string.
The root cause was a logic mismatch within InterceptionJob. It used
`net::SchemefulSite::IsSameSite` to decide whether to sanitize the
Referrer for the new URL. This function considers different ports on
localhost as same-site, so the Referrer was left unmodified.
However, the lower-level URLRequest performs a stricter, origin-based
Referrer-Policy check. It correctly identified the cross-port redirect
as cross-origin and expected a sanitized Referrer. This mismatch caused
the NetworkDelegate to block the request via
`CancelURLRequestWithPolicyViolatingReferrerHeader`.
This patch fixes the issue by replacing the `IsSameSite` check with
a direct `url::Origin` comparison. This aligns the interception logic
with the network stack, ensuring the Referrer is correctly handled for
cross-origin redirects before the request is dispatched.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |