summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/WebProcess/Plugins/PluginView.cpp')
-rw-r--r--Source/WebKit2/WebProcess/Plugins/PluginView.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp b/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
index d0a5e1e2c..e82704105 100644
--- a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
+++ b/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
@@ -61,6 +61,7 @@
#include <WebCore/SecurityPolicy.h>
#include <WebCore/Settings.h>
#include <WebCore/UserGestureIndicator.h>
+#include <wtf/text/StringBuilder.h>
using namespace JSC;
using namespace WebCore;
@@ -162,23 +163,22 @@ static String buildHTTPHeaders(const ResourceResponse& response, long long& expe
if (!response.isHTTP())
return String();
- Vector<UChar> stringBuilder;
- String separator(": ");
+ StringBuilder stringBuilder;
String statusLine = String::format("HTTP %d ", response.httpStatusCode());
- stringBuilder.append(statusLine.characters(), statusLine.length());
- stringBuilder.append(response.httpStatusText().characters(), response.httpStatusText().length());
+ stringBuilder.append(statusLine);
+ stringBuilder.append(response.httpStatusText());
stringBuilder.append('\n');
HTTPHeaderMap::const_iterator end = response.httpHeaderFields().end();
for (HTTPHeaderMap::const_iterator it = response.httpHeaderFields().begin(); it != end; ++it) {
- stringBuilder.append(it->key.characters(), it->key.length());
- stringBuilder.append(separator.characters(), separator.length());
- stringBuilder.append(it->value.characters(), it->value.length());
+ stringBuilder.append(it->key);
+ stringBuilder.appendLiteral(": ");
+ stringBuilder.append(it->value);
stringBuilder.append('\n');
}
- String headers = String::adopt(stringBuilder);
+ String headers = stringBuilder.toString();
// If the content is encoded (most likely compressed), then don't send its length to the plugin,
// which is only interested in the decoded length, not yet known at the moment.