APM Browser Check
I have a fussy application that has browser pre-requisites of:
- Internet Explorer 9 or later
- Firefox 25 or later
- Chrome 31 or later
- Safari 7 or later
I have setup an accessprofile, and added a "General Purpose\Empty" object branch.
I thought I could use the session.client.type and session.client.version to construct the check.
Something like this:
expr { [mcget {session.client.type}] == "IE" && [mcget {session.client.version}] >= "9" } || [mcget {session.client.type}] == "Chrome" && [mcget {session.client.version}] >= "31" }
however when using Chrome38 session.client.type = Mozilla and session.client.version = 5
It looks like I really need to parse the session.user.agent attribute.
Is there an easy way to achieve this?
or do I need to split the string by the " " (space) char and try and guess the right place?
Agent strings that should work:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1623.0 Safari/537.36
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0
Agent strings that should fail:
Mozilla/5.0 (Windows NT 6.0; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0
Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36
Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Can someone give me some clues?
Should the F5 add extra attributes from the parsed agent by default?