Bug 137828 - [Win] Allow WinLauncher to specify Custom User Agent strings
Summary: [Win] Allow WinLauncher to specify Custom User Agent strings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-17 12:32 PDT by Brent Fulgham
Modified: 2014-10-17 13:02 PDT (History)
0 users

See Also:


Attachments
Patch (14.13 KB, patch)
2014-10-17 12:35 PDT, Brent Fulgham
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2014-10-17 12:32:12 PDT
Many websites are needlessly bigoted against WinLauncher, refusing to run because it is not Internet Explorer or Safari.

This patch adds a set of common User Agent strings to the applications Development menu, and provides a text entry field that can be used to supply a completely novel User Agent if desired.
Comment 1 Brent Fulgham 2014-10-17 12:35:41 PDT
Created attachment 240030 [details]
Patch
Comment 2 Dean Jackson 2014-10-17 12:39:50 PDT
Comment on attachment 240030 [details]
Patch

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

> Tools/WinLauncher/Common.cpp:380
> +    case IDM_UA_SAFARI_IOS_7_IPHONE:
> +    case IDM_UA_SAFARI_IOS_7_IPAD:

Why not iOS 8?

> Tools/WinLauncher/WinLauncher.cpp:409
> +    case IDM_UA_SAFARI_IOS_7_IPHONE:
> +        customUserAgent = L"Mozilla/5.0 (iPod; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B329 Safari/8536.25";
> +        break;
> +    case IDM_UA_SAFARI_IOS_7_IPAD:
> +        customUserAgent = L"Mozilla/5.0 (iPad; CPU OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B329 Safari/8536.25";
> +        break;

Please add iOS 8.

> Tools/WinLauncher/WinLauncher.cpp:420
> +        customUserAgent = L"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0<";

Is that supposed to have a "<" at the end?

> Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.rc:230
> +IDD_USER_AGENT DIALOGEX 0, 0, 309, 176
> +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
> +CAPTION "Dialog"
> +FONT 8, "MS Shell Dlg", 400, 0, 0x1
> +BEGIN
> +    LTEXT           "Type a custom user agent string for this page.",IDC_Message,7,7,295,19
> +    EDITTEXT        IDC_USER_AGENT_INPUT,7,34,295,117,ES_AUTOHSCROLL
> +    DEFPUSHBUTTON   "OK",IDOK,198,155,50,14
> +    PUSHBUTTON      "Cancel",IDCANCEL,252,155,50,14
> +END

This is cool! I didn't know you could do that.
Comment 3 Brent Fulgham 2014-10-17 13:02:13 PDT
Committed r174831: <http://trac.webkit.org/changeset/174831>