Chromium Code Reviews| 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..cabd950973c9ed714d3c1b9050b78ef861c6e695 100644 |
| --- a/content/browser/loader/resource_dispatcher_host_impl.cc |
| +++ b/content/browser/loader/resource_dispatcher_host_impl.cc |
| @@ -1501,7 +1501,10 @@ 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()) { |
| + // |report_raw_headers| of navigation preload request was copied from the |
| + // the original request. So this check has already been carried out. |
|
falken
2017/01/18 14:50:07
I don't really understand this. It's possible that
horo
2017/01/19 09:57:09
If my understanding is correct, this check is prot
falken
2017/01/19 13:40:58
I understand the request is copied, but don't unde
horo
2017/01/19 14:33:04
CanReadRawCookies checks the child_id of ResourceR
falken
2017/01/20 01:38:54
That's the important detail I missed. Let's make t
horo
2017/01/20 13:18:36
Done.
|
| // TODO: crbug.com/523063 can we call bad_message::ReceivedBadMessage here? |
| VLOG(1) << "Denied unauthorized request for raw headers"; |
| report_raw_headers = false; |