Skip to content
Permalink
Browse files
[GTK] REGRESSION: application name is not correctly appended to the UA
https://bugs.webkit.org/show_bug.cgi?id=133793

Reviewed by Carlos Garcia Campos.

Source/WebCore:
We must use a blank to separate the default UA provided by WebKitGtk
from the application name coming from the public API.

Added an extra test case to the API tests to catch regressions.

* platform/gtk/UserAgentGtk.cpp:
(WebCore::standardUserAgent):

Tools:
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp:
(testWebKitSettingsUserAgent):


Canonical link: https://commits.webkit.org/151776@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
svillar committed Jun 12, 2014
1 parent a4dc9b0 commit 420dd505de3170899c1cdc4a534f1ddeb8224d09
Showing 4 changed files with 29 additions and 1 deletion.
@@ -1,3 +1,18 @@
2014-06-12 Sergio Villar Senin <svillar@igalia.com>

[GTK] REGRESSION: application name is not correctly appended to the UA
https://bugs.webkit.org/show_bug.cgi?id=133793

Reviewed by Carlos Garcia Campos.

We must use a blank to separate the default UA provided by WebKitGtk
from the application name coming from the public API.

Added an extra test case to the API tests to catch regressions.

* platform/gtk/UserAgentGtk.cpp:
(WebCore::standardUserAgent):

2014-06-12 Zan Dobersek <zdobersek@igalia.com>

WorkerRunLoop::Task::performTask should take in WorkerGlobalScope* to avoid downcasting
@@ -169,7 +169,7 @@ String standardUserAgent(const String& applicationName, const String& applicatio
if (finalApplicationVersion.isEmpty())
finalApplicationVersion = versionForUAString();

return standardUserAgentStatic() + applicationName + '/' + finalApplicationVersion;
return standardUserAgentStatic() + ' ' + applicationName + '/' + finalApplicationVersion;
}

String standardUserAgentForURL(const URL& url)
@@ -1,3 +1,13 @@
2014-06-12 Sergio Villar Senin <svillar@igalia.com>

[GTK] REGRESSION: application name is not correctly appended to the UA
https://bugs.webkit.org/show_bug.cgi?id=133793

Reviewed by Carlos Garcia Campos.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitSettings.cpp:
(testWebKitSettingsUserAgent):

2014-06-12 Sergio Villar Senin <svillar@igalia.com>

[GTK] Unsupported browser in www.icloud.com
@@ -336,6 +336,9 @@ static void testWebKitSettingsUserAgent(WebViewTest* test, gconstpointer)
const char* newUserAgent = webkit_settings_get_user_agent(settings.get());
g_assert(g_strstr_len(newUserAgent, -1, "3.4.5"));
g_assert(g_strstr_len(newUserAgent, -1, "WebCatGTK+"));

GUniquePtr<char> applicationUserAgent(g_strdup_printf("%s %s", defaultUserAgent.data(), "WebCatGTK+/3.4.5"));
g_assert_cmpstr(applicationUserAgent.get(), ==, webkit_settings_get_user_agent(settings.get()));
}

static void serverCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer)

0 comments on commit 420dd50

Please sign in to comment.