| Index: content/browser/loader/resource_dispatcher_host_impl.cc
|
| diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
|
| index fa98d50d4485c8b9138174bf293a523d65aaecdd..a8a56289e5dd2615e4a7c54497f3fa5518524ce4 100644
|
| --- a/content/browser/loader/resource_dispatcher_host_impl.cc
|
| +++ b/content/browser/loader/resource_dispatcher_host_impl.cc
|
| @@ -1501,7 +1501,12 @@ void ResourceDispatcherHostImpl::ContinuePendingBeginRequest(
|
| ChildProcessSecurityPolicyImpl* policy =
|
| ChildProcessSecurityPolicyImpl::GetInstance();
|
| bool report_raw_headers = request_data.report_raw_headers;
|
| - if (report_raw_headers && !policy->CanReadRawCookies(child_id)) {
|
| + if (report_raw_headers && !policy->CanReadRawCookies(child_id) &&
|
| + !requester_info->IsNavigationPreload()) {
|
| + // For navigation preload, the child_id is -1 so CanReadRawCookies would
|
| + // return false. But |report_raw_headers| of the navigation preload request
|
| + // was copied from the original request, so this check has already been
|
| + // carried out.
|
| // TODO: crbug.com/523063 can we call bad_message::ReceivedBadMessage here?
|
| VLOG(1) << "Denied unauthorized request for raw headers";
|
| report_raw_headers = false;
|
|
|