diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2016-08-15 13:38:26 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-01-09 16:12:10 +0000 |
commit | a0c60c53c0fe1b1f6b5ab52944e031a3684e3de1 (patch) | |
tree | 6f5bbb8f787cf6d3a653fc696eb34712581c6263 | |
parent | 548380af096f8277e460383c81a4ecdf2b77523f (diff) |
Imitate Safari's UA string better
Some sites doing UA sniffing don't recognize our default UA string
without "Version/x.y" component, corresponding to version number of
Safari.
Task-number: QTBUG-38211
Change-Id: Ic5082a938f639502bb2c11c7df2538584b5f77ee
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | Source/WebCore/platform/qt/UserAgentQt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/WebCore/platform/qt/UserAgentQt.cpp b/Source/WebCore/platform/qt/UserAgentQt.cpp index 80996a223..b61331644 100644 --- a/Source/WebCore/platform/qt/UserAgentQt.cpp +++ b/Source/WebCore/platform/qt/UserAgentQt.cpp @@ -37,7 +37,7 @@ namespace WebCore { This implementation returns the following value: - "Mozilla/5.0 (%Platform%%Security%%Subplatform%) AppleWebKit/%WebKitVersion% (KHTML, like Gecko) %AppVersion Safari/%WebKitVersion%" + "Mozilla/5.0 (%Platform%%Security%%Subplatform%) AppleWebKit/%WebKitVersion% (KHTML, like Gecko) %AppVersion Version/7.0 Safari/%WebKitVersion%" In this string the following values are replaced the first time the function is called: \list @@ -58,7 +58,7 @@ String UserAgentQt::standardUserAgent(const String &applicationNameForUserAgent, if (ua.isNull()) { - ua = QLatin1String("Mozilla/5.0 (%1%2%3) AppleWebKit/%4 (KHTML, like Gecko) %99 Safari/%5"); + ua = QLatin1String("Mozilla/5.0 (%1%2%3) AppleWebKit/%4 (KHTML, like Gecko) %99 Version/7.0 Safari/%5"); // Platform. ua = ua.arg(QLatin1String( |