Chromium Code Reviews
DescriptionPropagate Origin header via CreateURLRequestForNavigation.
The CL makes sure that when CreateURLRequestForNavigation populates
Referrer of WebURLRequest, it also adds Origin header if needed, by
calling WebURLRequest::addHTTPOriginIfNeeded with Origin derrived from
Referrer. Because ResourceRequest::addHTTPOriginIfNeeded method
inspects the HTTP method, the call to WebURLRequest::setHTTPMethod had
to be moved slightly earlier.
The modified CreateURLRequestForNavigation helper function is called from
1) RenderFrameImpl::NavigateInternal and
2) RenderFrameImpl::OnFailedNavigation (PlzNavigate-only, returned
WebURLRequest is only used in a call to GetNavigationErrorStrings)
The CL also adds 2 extra tests to ensure that not only the CL fixes
form-targets-cross-site-frame-post.html scenario, but that Origin
and Referer headers are also behaving expectedly if 1) referrer
policy is present or 2) redirects are present.
BUG=635400
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Committed: https://crrev.com/693329deb699ad58094fa7ef4d75087aa2411c2b
Cr-Commit-Position: refs/heads/master@{#411841}
Patch Set 1 #Patch Set 2 : Tests for referrer policy. #Patch Set 3 : Browser test for verifying Origin and Referer headers after POST + redirects. #Patch Set 4 : Rebasing... #
Total comments: 2
Patch Set 5 : Simplify code for converting GURL into WebString representing the origin. #
Total comments: 3
Messages
Total messages: 16 (7 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||