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

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

Issue 185663002: Pass http response headers to the streamsPrivate API callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
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 e8dc53eb7a67c136c5bb15b3ac1ea70dae50679d..29e686b226f45771f84e7829af71fdf737968570 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -610,6 +610,9 @@ ResourceDispatcherHostImpl::MaybeInterceptAsStream(net::URLRequest* request,
ResourceResponse* response) {
ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request);
const std::string& mime_type = response->head.mime_type;
+ std::string response_headers;
+ if (response->head.headers)
+ response->head.headers->GetNormalizedHeaders(&response_headers);
GURL origin;
std::string target_id;
@@ -636,7 +639,8 @@ ResourceDispatcherHostImpl::MaybeInterceptAsStream(net::URLRequest* request,
info->GetChildID(),
info->GetRouteID(),
target_id,
- handler->stream()->CreateHandle(request->url(), mime_type),
+ handler->stream()->CreateHandle(request->url(), mime_type,
+ response_headers),
request->GetExpectedContentSize());
return handler.PassAs<ResourceHandler>();
}

Powered by Google App Engine
This is Rietveld 408576698