diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
commit | cfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch) | |
tree | 24d68c6f61c464ecba1e05670b80390ea3b0e50c /Source/WebKit2/WebProcess/Plugins/PluginView.cpp | |
parent | 69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff) | |
download | qtwebkit-cfd86b747d32ac22246a1aa908eaa720c63a88c1.tar.gz |
Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733)
New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes.
Diffstat (limited to 'Source/WebKit2/WebProcess/Plugins/PluginView.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/Plugins/PluginView.cpp | 16 |
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. |