Commit 4e2660f5 authored by kouhei's avatar kouhei Committed by Commit bot

GetMimeTypeAndCharset at once

HttpResponseHeaders::Get{MimeType,Charset} calls GetMimeTypeAndCharset internally
and discards the other.
As we are going to use both in parseMultipartHeadersFromBody, we should call it directly.

BUG=None

Review-Url: https://codereview.chromium.org/2568343002
Cr-Commit-Position: refs/heads/master@{#438049}
parent 810bce4c
......@@ -874,12 +874,9 @@ bool parseMultipartHeadersFromBody(const char* bytes,
new net::HttpResponseHeaders(
net::HttpUtil::AssembleRawHeaders(headers.data(), headers.length()));
std::string mimeType;
responseHeaders->GetMimeType(&mimeType);
std::string mimeType, charset;
responseHeaders->GetMimeTypeAndCharset(&mimeType, &charset);
response->setMimeType(WebString::fromUTF8(mimeType));
std::string charset;
responseHeaders->GetCharset(&charset);
response->setTextEncodingName(WebString::fromUTF8(charset));
// Copy headers listed in replaceHeaders to the response.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment