diff --git a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLog.java b/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLog.java index 390b750..4b8ce02 100644 --- a/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLog.java +++ b/src/fr/devinsy/statoolinfos/metrics/http/HttpAccessLog.java @@ -23,6 +23,7 @@ import java.time.format.DateTimeFormatter; import java.util.Locale; import java.util.regex.Pattern; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -184,7 +185,18 @@ public class HttpAccessLog { boolean result; - result = StringsUtils.containsAnyIgnoreCase(this.userAgent.toString(), "bot", "monitoring"); + if (StringsUtils.containsAnyIgnoreCase(this.userAgent.toString(), "bot", "monitoring", "Apache-HttpClient")) + { + result = true; + } + else if (StringUtils.startsWithAny(this.userAgent.toString(), "Java/", "HotJava/")) + { + result = true; + } + else + { + result = false; + } // return result;