| Index: content/child/web_url_loader_impl.cc
|
| diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
|
| index 17da0e103519d484dec9df5c4376e17e589aa2f0..5933358aede42e0859c5638a3e53bd314ff33373 100644
|
| --- a/content/child/web_url_loader_impl.cc
|
| +++ b/content/child/web_url_loader_impl.cc
|
| @@ -598,12 +598,11 @@ bool WebURLLoaderImpl::Context::OnReceivedRedirect(
|
| : blink::WebURLRequest::SkipServiceWorker::All,
|
| &new_request);
|
|
|
| - client_->willFollowRedirect(loader_, new_request, response,
|
| - info.encoded_data_length);
|
| - request_ = new_request;
|
| + bool follow = client_->willFollowRedirect(loader_, new_request, response,
|
| + info.encoded_data_length);
|
| + if (follow) {
|
| + request_ = new_request;
|
|
|
| - // Only follow the redirect if WebKit left the URL unmodified.
|
| - if (redirect_info.new_url == GURL(new_request.url())) {
|
| // First-party cookie logic moved from DocumentLoader in Blink to
|
| // net::URLRequest in the browser. Assert that Blink didn't try to change it
|
| // to something else.
|
| @@ -612,9 +611,8 @@ bool WebURLLoaderImpl::Context::OnReceivedRedirect(
|
| return true;
|
| }
|
|
|
| - // We assume that WebKit only changes the URL to suppress a redirect, and we
|
| - // assume that it does so by setting it to be invalid.
|
| - DCHECK(!new_request.url().isValid());
|
| + request_ = WebURLRequest();
|
| +
|
| return false;
|
| }
|
|
|
|
|