From 8e3c1a7ce2fb52858b6908cdd5bd5ddf547fd386 Mon Sep 17 00:00:00 2001 From: "darin@chromium.org" Date: Tue, 25 Nov 2008 01:13:32 +0000 Subject: Fixes the WebRequest API to consistently use std::string instead of std::wstring for HTTP header fields The HTTP specification guarantees that all fields in the header will be ASCII and thus fit fine in a std::string. The GetHttpHeaders/SetHttpHeaders interfaces use std::string values for HTTP headers. This patch fixes GetHttpMethod(), SetHttpMethod(), GetHttpHeaderValue() and SetHttpHeaderValue() and callers to use std::string as well. Patch by James Robinson R=darin Review URL: http://codereview.chromium.org/12412 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5955 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/render_view.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'chrome') diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 4d4d4e9..835e73f 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -853,8 +853,8 @@ void RenderView::OnNavigate(const ViewMsg_Navigate_Params& params) { request->SetHistoryState(params.state); if (params.referrer.is_valid()) { - request->SetHttpHeaderValue(L"Referer", - UTF8ToWide(params.referrer.spec())); + request->SetHttpHeaderValue("Referer", + params.referrer.spec()); } main_frame->LoadRequest(request.get()); @@ -1093,8 +1093,8 @@ void RenderView::UpdateURL(WebFrame* frame) { params.referrer = GURL(initial_request.GetHttpReferrer()); } - std::wstring method = request.GetHttpMethod(); - if (method == L"POST") + std::string method = request.GetHttpMethod(); + if (method == "POST") params.is_post = true; Send(new ViewHostMsg_FrameNavigate(routing_id_, params)); -- cgit v1.1