Bug 133855 - [Gtk] [Stable] Fix the "Safari" part of the UA
Summary: [Gtk] [Stable] Fix the "Safari" part of the UA
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 133403
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-13 07:30 PDT by Sergio Villar Senin
Modified: 2014-06-16 09:21 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.76 KB, patch)
2014-06-13 07:37 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2014-06-13 07:30:27 PDT
The part of our UA where we claim to be Safari is plainly wrong. Since version 3.0 the Safari user agent has the following structure:

Version/X Safari/Y

while in WebKitGtk that part looks like

Safari/Y Version/6.0

This is causing problems with lots of websites, some of them very important like live.com (hotmail.com) our www.icloud.com, that report "unsupported browser" problems.

This is basically a port of https://bugs.webkit.org/show_bug.cgi?id=133403
Comment 1 Sergio Villar Senin 2014-06-13 07:37:55 PDT
Created attachment 233049 [details]
Patch
Comment 2 Martin Robinson 2014-06-13 08:10:08 PDT
Comment on attachment 233049 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233049&action=review

> Tools/TestWebKitAPI/Tests/WebKitGtk/testwebsettings.c:108
>      settings = webkit_web_view_get_settings(WEBKIT_WEB_VIEW(webView));
>      defaultUserAgent = g_strdup(webkit_web_settings_get_user_agent(settings));
>  
> +    g_assert(g_strstr_len(defaultUserAgent, -1, "Version/8.0 Safari/"));
> +    g_assert(g_strstr_len(defaultUserAgent, -1, "Version/8.0") < g_strstr_len(defaultUserAgent, -1, "Safari/"));
> +
>      test_non_quirky_user_agents(settings, defaultUserAgent);
>  
>      /* Test quirky google domains */

This file doesn't exist any longer. :)
Comment 3 Sergio Villar Senin 2014-06-13 08:14:27 PDT
Comment on attachment 233049 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233049&action=review

>> Tools/TestWebKitAPI/Tests/WebKitGtk/testwebsettings.c:108
>>      /* Test quirky google domains */
> 
> This file doesn't exist any longer. :)

It does in the stable branch. This is for stable only
Comment 4 Martin Robinson 2014-06-13 08:19:43 PDT
Comment on attachment 233049 [details]
Patch

Doh! Sorry.
Comment 5 Sergio Villar Senin 2014-06-16 09:21:30 PDT
Committed finally in r170009
Comment 6 Sergio Villar Senin 2014-06-16 09:21:53 PDT
Comment on attachment 233049 [details]
Patch

Clearing the flag now that landed