mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Detect Google Mediapartners browser.
This commit is contained in:
parent
e76a2372d0
commit
3f2b343a06
@ -99,6 +99,13 @@ public class UserAgent implements Serializable {
|
||||
// Format ApplicationName/ApplicationVersion ();
|
||||
|
||||
try {
|
||||
|
||||
// Mediapartners-Google -> Add sense robot
|
||||
if(userAgentHeader.equals("Mediapartners-Google")){
|
||||
this.product = Product.WEB_CRAWLER;
|
||||
return;
|
||||
}
|
||||
|
||||
int detailStart = userAgentHeader.indexOf('(');
|
||||
int detailEnd = userAgentHeader.indexOf(')');
|
||||
|
||||
@ -114,9 +121,8 @@ public class UserAgent implements Serializable {
|
||||
|
||||
this.os = parseOS(productDetails);
|
||||
|
||||
if (userAgentHeader.contains("Googlebot") || userAgentHeader.contains("Mediapartners-Google")) {
|
||||
if (userAgentHeader.contains("Googlebot") || ) {
|
||||
//"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
||||
// Mediapartners-Google -> Add sense robot
|
||||
this.product = Product.WEB_CRAWLER;
|
||||
|
||||
} else if (userAgentHeader.contains("MSIE")) {
|
||||
|
Loading…
Reference in New Issue
Block a user