Bug 133855

Summary: [Gtk] [Stable] Fix the "Safari" part of the UA
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, gustavo, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 133403    
Bug Blocks:    
Attachments:
Description Flags
Patch none

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