From 275d594d19ee1e50e97db25ab9b2073b5e5e073b Mon Sep 17 00:00:00 2001 From: Glyn Normington Date: Wed, 12 Mar 2025 10:32:43 +0000 Subject: [PATCH] Test case insensitive matching of user agent Fixes https://github.com/glyn/nginx_robot_access/issues/7 --- src/robot.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/robot.rs b/src/robot.rs index aef374c..4db9b8e 100644 --- a/src/robot.rs +++ b/src/robot.rs @@ -247,5 +247,6 @@ mod test { assert_eq!(true, allow_access("User-agent: Xbot\nDisallow: /z", "XBot/3.2.1", "/")); assert_eq!(true, allow_access("User-agent: Xbot\nDisallow: /z", "XBot/3.2.1", "/w")); assert_eq!(false, allow_access("User-agent: Xbot\nDisallow: /", "XBot", "/")); + assert_eq!(false, allow_access("User-agent: Xbot\nDisallow: /", "xbot", "/")); } } \ No newline at end of file