Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(927)

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 667483002: Account for NULL headers in streams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a test Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e073710420a18414dfcb592fe53119bd4d9e6246..ef7e1b4b90695986743af70481bc42a5af4dadf9 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -745,8 +745,10 @@ ResourceDispatcherHostImpl::MaybeInterceptAsStream(net::URLRequest* request,
// Make a copy of the response headers so it is safe to pass across threads;
// the old handler (AsyncResourceHandler) may modify it in parallel via the
// ResourceDispatcherHostDelegate.
- stream_info->response_headers =
- new net::HttpResponseHeaders(response->head.headers->raw_headers());
+ if (response->head.headers.get()) {
+ stream_info->response_headers =
+ new net::HttpResponseHeaders(response->head.headers->raw_headers());
+ }
delegate_->OnStreamCreated(request, stream_info.Pass());
return handler.PassAs<ResourceHandler>();
}
« no previous file with comments | « chrome/test/data/extensions/api_test/streams_private/handle_mime_type/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698