Commit 5052ad78 authored by msaboff@apple.com's avatar msaboff@apple.com

buildHTTPHeaders() should use a StringBuilder.appendLiteral() for separator

https://bugs.webkit.org/show_bug.cgi?id=100689

Reviewed by Darin Adler.

Changed from using a String temporary for the separator to using StringBuilder.appendLiteral(": ").

* WebProcess/Plugins/PluginView.cpp:
(WebKit::buildHTTPHeaders):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0dd62360
2012-10-29 Michael Saboff <msaboff@apple.com>
buildHTTPHeaders() should use a StringBuilder.appendLiteral() for separator
https://bugs.webkit.org/show_bug.cgi?id=100689
Reviewed by Darin Adler.
Changed from using a String temporary for the separator to using StringBuilder.appendLiteral(": ").
* WebProcess/Plugins/PluginView.cpp:
(WebKit::buildHTTPHeaders):
2012-10-29 Michael Saboff <msaboff@apple.com>
WKStringCopyCFString() should directly use 8 bit Strings data instead of up converting
......
......@@ -164,7 +164,6 @@ static String buildHTTPHeaders(const ResourceResponse& response, long long& expe
return String();
StringBuilder stringBuilder;
String separator(": ");
String statusLine = String::format("HTTP %d ", response.httpStatusCode());
stringBuilder.append(statusLine);
......@@ -174,7 +173,7 @@ static String buildHTTPHeaders(const ResourceResponse& response, long long& expe
HTTPHeaderMap::const_iterator end = response.httpHeaderFields().end();
for (HTTPHeaderMap::const_iterator it = response.httpHeaderFields().begin(); it != end; ++it) {
stringBuilder.append(it->key);
stringBuilder.append(separator);
stringBuilder.appendLiteral(": ");
stringBuilder.append(it->value);
stringBuilder.append('\n');
}
......
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