http-browserdetect icon indicating copy to clipboard operation
http-browserdetect copied to clipboard

Wrong browser_version detection for Chrome-based Googlebot

Open eserte opened this issue 7 years ago • 0 comments

$ perl -MHTTP::BrowserDetect -E 'say HTTP::BrowserDetect->new(shift)->browser_version' "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"  
2.1

I would expect "41.0" here.

It seems that this is caused by getting a successful match here: https://metacpan.org/source/OALDERS/HTTP-BrowserDetect-3.20/lib/HTTP/BrowserDetect.pm#L1812 Maybe this check should be done later, or be done for specific browsers only (probably MSIE, but what are "some others"?).

eserte avatar Dec 26 '18 17:12 eserte