Consider below code:
String userAgent = request.getHeader("User-Agent");
In my case "request.getHeader("User-Agent")" method call returns below string.
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E)
but when I check my user agent string at http://useragentstring.com
it shows as Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
which is correct as per browser version shown by the IE browser.
So My concern is that method that I am using is correct or missing something, because the same code returns proper UserAgent String in chrome and Mozilla.