Add support for setting response header values (issue #246).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@246 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-05-26 18:11:56 +00:00
parent 81b0a9a362
commit 42b5597214
4 changed files with 28 additions and 18 deletions

View File

@@ -446,14 +446,11 @@ class RequestProxy : public net::URLRequest::Delegate,
CefResponseImpl* responseImpl =
static_cast<CefResponseImpl*>(response.get());
scoped_refptr<net::HttpResponseHeaders> headers(
new net::HttpResponseHeaders(
responseImpl->GenerateResponseLine()));
ResourceResponseInfo info;
info.content_length = static_cast<int64>(offset);
info.mime_type = response->GetMimeType();
info.headers = headers;
info.headers = responseImpl->GetResponseHeaders();
OnReceivedResponse(info, params->url);
AsyncReadData();
} else if (response->GetStatus() != 0) {
@@ -462,14 +459,11 @@ class RequestProxy : public net::URLRequest::Delegate,
CefResponseImpl* responseImpl =
static_cast<CefResponseImpl*>(response.get());
scoped_refptr<net::HttpResponseHeaders> headers(
new net::HttpResponseHeaders(
responseImpl->GenerateResponseLine()));
ResourceResponseInfo info;
info.content_length = 0;
info.mime_type = response->GetMimeType();
info.headers = headers;
info.headers = responseImpl->GetResponseHeaders();
OnReceivedResponse(info, params->url);
AsyncReadData();
}