New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 653765 link

Starred by 0 users

Issue metadata

Status: Duplicate
Owner:
Leaves the project on 2018/03/02
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Modifications to |newRequest| in blink::WebURLLoaderClient::willFollowRedirect() may not be respected

Project Member Reported by shaochuan@chromium.org, Oct 7 2016

Issue description

https://cs.chromium.org/chromium/src/third_party/WebKit/public/platform/WebURLLoaderClient.h?q=blink::WebURLLoaderClient&sq=package:chromium&dr=Ss&l=47
Comments mention that |newRequest| may be modified in the willFollowRedirect() callback, but this is misleading since the caller (WebURLLoaderImpl::Context::OnReceivedRedirect()) is not actually propagating changes back to the browser process.
To be precise, modifications to fields used in WebURLLoaderImpl::Context::Start() to initialize content::ResourceRequest will be invalid, since it's not updated in browser process after the callback.

WebURLLoaderClient implementations have been modifying |newRequest| but the behavior might be different from expected.
For example, if |newRequest.m_allowStoredCredentials| is changed in ResourceFetcher::willFollowRedirect(), load flags for the next request should in turn be modified (see content::GetLoadFlagsForWebURLRequest()), but this is not the case.

To behave as documented, we should actually propagate changes back to browser through IPC.
Otherwise it would be better to make |newRequest| const to make it simply a reference for implementations to decide whether to follow redirect or not.
 
Components: -Blink Blink>Loader
Cc: tyoshino@chromium.org
Owner: tyoshino@chromium.org
Blink triager here, assigning to tyoshino to take a look. Please reassign as necessary.
Cc: hirosh...@chromium.org
Status: Assigned (was: Untriaged)
Mergedinto: 665766
Status: Duplicate (was: Assigned)

Sign in to add a comment