[webkit-reviews] review requested: [Bug 17375] Set user-agent from application : [Attachment 30468] Add WebView APIs to manipulate the UA string

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 19 06:28:32 PDT 2009


Jan Alonzo <jmalonzo at gmail.com> has asked  for review:
Bug 17375: Set user-agent from application
https://bugs.webkit.org/show_bug.cgi?id=17375

Attachment 30468: Add WebView APIs to manipulate the UA string 
https://bugs.webkit.org/attachment.cgi?id=30468&action=review

------- Additional Comments from Jan Alonzo <jmalonzo at gmail.com>
This patch adds WebView APIs to manipulate the UA-String to be sent by WebKit.
It allows:

1. Clients to add an 'application name' as part of the default User-Agent
string.
2. Set a custom UA to be used by WebKit instead of the default one.
3. Query the "currently used" User-Agent string through a "user-agent" property
in the WebView.

I also added a unit test to test the functionality. I also moved the WebKit UA
version in configure so we can easily change it without touching the code.

I also changed the UA slightly from (platform, osversion, etc.. are just
samples):

Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/530.11+ (KHTML, like
Gecko,Safari/530.11+)

to:

Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/530.11+ (KHTML, like
Gecko) Safari/530.11+

since I think the latter is a closer interpretation of
https://developer.mozilla.org/En/User_Agent_Strings_Reference than the former.

Thoughts?


More information about the webkit-reviews mailing list