Changed order on which we verify bots to be the first thing we check.
@@ -553,6 +553,9 @@ verify_browser (char *str, char *type) {
if (str == NULL || *str == '\0')
return NULL;
+ if ((match = check_http_crawler (str)) && (token = parse_crawler (str, match, type)))
+ return token;
+
/* check user's list */
for (i = 0; i < conf.browsers_hash_idx; ++i) {
if ((match = strstr (str, conf.user_browsers_hash[i][0])) == NULL)
@@ -560,9 +563,6 @@ verify_browser (char *str, char *type) {
return parse_browser (match, type, i, conf.user_browsers_hash);
}
- if ((match = check_http_crawler (str)) && (token = parse_crawler (str, match, type)))
- return token;
-
/* fallback to default browser list */
for (j = 0; j < ARRAY_SIZE (browsers); ++j) {
if ((match = strstr (str, browsers_hash[j][0])) == NULL)
