diff options
author | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-26 05:01:11 +0000 |
---|---|---|
committer | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-26 05:01:11 +0000 |
commit | e62b65a1dd07c8fd4e1fa61c67c65aecb75a316c (patch) | |
tree | 05c1d9816ee7eeff5d4cc232b5cfa9a9809a812b /content/browser/loader/resource_dispatcher_host_impl.cc | |
parent | a3d215ec60d3a3f1e9316e240d4b14d2a28426fc (diff) | |
download | chromium_src-e62b65a1dd07c8fd4e1fa61c67c65aecb75a316c.zip chromium_src-e62b65a1dd07c8fd4e1fa61c67c65aecb75a316c.tar.gz chromium_src-e62b65a1dd07c8fd4e1fa61c67c65aecb75a316c.tar.bz2 |
Change the streamsPrivate extensions API to return HTTP response headers in a dictionary
This changes from returning the response headers as a raw string to a dictionary mapping
header name to header value. If there are multiple headers with the same name, the values
are merged in a dictionary and separated by a ", ".
BUG=350755
Review URL: https://codereview.chromium.org/198463005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259496 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/loader/resource_dispatcher_host_impl.cc')
-rw-r--r-- | content/browser/loader/resource_dispatcher_host_impl.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc index 1199957..9234315 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.cc +++ b/content/browser/loader/resource_dispatcher_host_impl.cc @@ -610,9 +610,6 @@ 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; @@ -639,8 +636,10 @@ ResourceDispatcherHostImpl::MaybeInterceptAsStream(net::URLRequest* request, info->GetChildID(), info->GetRouteID(), target_id, - handler->stream()->CreateHandle(request->url(), mime_type, - response_headers), + handler->stream()->CreateHandle( + request->url(), + mime_type, + response->head.headers), request->GetExpectedContentSize()); return handler.PassAs<ResourceHandler>(); } |