Chromium Code Reviews
DescriptionMake DocumentThreadableLoader's cross origin logic clearer in terms of layering
- Call removeCredentials() on ResourceRequest before invoking the
CrossOriginPreflightResultCache's canSkipPreflight to determine the
final request to send after possible preflight. But generate the
referrer and origin header right before loadRequest(). It looks this
would fix a possible bug that canSkipPreflight() always returns false
due to setHTTPReferrer() call when m_didRedirect is true.
- Rename m_didRedirect to m_overrideReferrer as it's set only when the
redirect was cross origin. Not always.
- Eliminate the unnecessary loadActualRequest() invocation on the path
where we don't issue a preflight.
- Let createAccessControlPreflightRequest() just DCHECK() on the passed
URL instead of calling removeCredentials() separately. It's better to
just depend on the input |request| as the role of the preflight is to
check that the |request| can be accepted by the server.
R=mkwst@chromium.org
BUG=427429, 641620, 557621
Committed: https://crrev.com/5eba3e9043b40c4a0b051123a364f2c97dfdf088
Cr-Commit-Position: refs/heads/master@{#430543}
Patch Set 1 #Patch Set 2 : Rebase #
Messages
Total messages: 18 (12 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||