Skip to content

Commit

Permalink
Converted crawler user agent string to lowercase to address bug with …
Browse files Browse the repository at this point in the history
…non-lowercase values
  • Loading branch information
rvenutolo committed Apr 2, 2016
1 parent bb6bb78 commit 9076c81
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static HostDirectives parse(String content, String myUserAgent) {

if (line.matches(PATTERNS_USERAGENT)) {
String ua = line.substring(PATTERNS_USERAGENT_LENGTH).trim().toLowerCase();
inMatchingUserAgent = "*".equals(ua) || ua.contains(myUserAgent);
inMatchingUserAgent = "*".equals(ua) || ua.contains(myUserAgent.toLowerCase());
} else if (line.matches(PATTERNS_DISALLOW)) {
if (!inMatchingUserAgent) {
continue;
Expand Down

0 comments on commit 9076c81

Please sign in to comment.