summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-31 01:00:49 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-31 01:00:49 +0000
commitb1fd7195a16a473e8446b24701579a3347a31b3b (patch)
treec1f28b37482d154b78c5f87f6fc0790a0bf3125a /webkit/glue
parent5ae7f230fb22a9cb8f7f23432b251bbbfbc0bb73 (diff)
downloadchromium_src-b1fd7195a16a473e8446b24701579a3347a31b3b.zip
chromium_src-b1fd7195a16a473e8446b24701579a3347a31b3b.tar.gz
chromium_src-b1fd7195a16a473e8446b24701579a3347a31b3b.tar.bz2
Delete net::GetHeaderParamValue
This function is a trap. It's a quick-and-dirty parser that has many nutty quirks. There's only one caller left, and that callers should really be using a Content-Type-specific parser anyway. Review URL: http://codereview.chromium.org/9296005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/multipart_response_delegate.cc4
-rw-r--r--webkit/glue/weburlloader_impl.cc11
2 files changed, 10 insertions, 5 deletions
diff --git a/webkit/glue/multipart_response_delegate.cc b/webkit/glue/multipart_response_delegate.cc
index 40ccc09..24413eeb 100644
--- a/webkit/glue/multipart_response_delegate.cc
+++ b/webkit/glue/multipart_response_delegate.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -248,7 +248,7 @@ bool MultipartResponseDelegate::ParseHeaders() {
std::string charset;
bool has_charset = false;
net::HttpUtil::ParseContentType(content_type, &mime_type, &charset,
- &has_charset);
+ &has_charset, NULL);
WebURLResponse response(original_response_.url());
response.setMIMEType(WebString::fromUTF8(mime_type));
response.setTextEncodingName(WebString::fromUTF8(charset));
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index 8315b61..39bbb56 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -19,6 +19,7 @@
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "net/http/http_response_headers.h"
+#include "net/http/http_util.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPLoadInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
@@ -561,8 +562,12 @@ void WebURLLoaderImpl::Context::OnReceivedResponse(
std::string content_type;
info.headers->EnumerateHeader(NULL, "content-type", &content_type);
- std::string boundary = net::GetHeaderParamValue(
- content_type, "boundary", net::QuoteRule::REMOVE_OUTER_QUOTES);
+ std::string mime_type;
+ std::string charset;
+ bool had_charset;
+ std::string boundary;
+ net::HttpUtil::ParseContentType(content_type, &mime_type, &charset,
+ &had_charset, &boundary);
TrimString(boundary, " \"", &boundary);
// If there's no boundary, just handle the request normally. In the gecko