oalders / http-browserdetect

Determine the Web browser, version, and platform from an HTTP user agent string
http://www.browserdetect.org
Other
58 stars 47 forks source link

User-Agents misdiagnosed as robot? #30

Open als1 opened 12 years ago

als1 commented 12 years ago

I noticed a couple of User-Agents that are flagged as robot. This may be correct, but I think in these cases HTTP::BrowserDetect is getting tripped by the url in the User-Agent. The User-Agents appear to be IE 7 and 8 running with some embedded browser toolkit from balsa.com (they call it "Embedded Web Browser Pack"), which at some point added the url to the User-Agent on IE (I don't use IE, but did a bit of searching around).

Anyway, not a huge deal since it's probably a small number of cases, but I thought I'd let you know in case you want to handle these.

"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://bsalsa.com) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C)" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://bsalsa.com) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)"

% perl -MHTTP::BrowserDetect -nle 'print "robot: ".( HTTP::BrowserDetect->new($_)->robot ? "yes" : "no" )' Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://bsalsa.com) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C) robot: yes Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://bsalsa.com) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) robot: yes

oalders commented 12 years ago

Thanks very much for pointing this out. Are you motivated to provide a patch for this?

als1 commented 12 years ago

Yes, I can look at that.