Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/trigonic/jrobotx/Record.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public boolean matches(String userAgentString) {

userAgentString = userAgentString.toLowerCase();
for (String userAgent : userAgents) {
if (userAgent.equals(ANY) || userAgentString.contains(userAgent)) {
if (userAgent.equals(ANY) || userAgentString.contains(userAgent.toLowerCase())) {
result = true;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/trigonic/jrobotx/RecordTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
public class RecordTest {
@Test
public void test() {
Set<String> userAgents = new HashSet<String>(Arrays.asList("netscape", "mozilla"));
Set<String> userAgents = new HashSet<String>(Arrays.asList("netscape", "Mozilla"));
List<String[]> rules = new ArrayList<String[]>();
rules.add(new String[] {"Disallow", ""});
rules.add(new String[] {"Disallow", "/foo/bar/"});
Expand Down