Fix AntPathMatcher multiple segments matching
Prior to this commit, the new match algorithm wouldn't work for multiple consecutive path separators. This commit separately matches path segments and path separators and allows for multiple, consecutive path separators. Issue: SPR-14141
This commit is contained in:
@@ -53,6 +53,7 @@ public class AntPathMatcherTests {
|
||||
// test exact matching
|
||||
assertTrue(pathMatcher.match("test", "test"));
|
||||
assertTrue(pathMatcher.match("/test", "/test"));
|
||||
assertTrue(pathMatcher.match("http://example.org", "http://example.org")); // SPR-14141
|
||||
assertFalse(pathMatcher.match("/test.jpg", "test.jpg"));
|
||||
assertFalse(pathMatcher.match("test", "/test"));
|
||||
assertFalse(pathMatcher.match("/test", "test"));
|
||||
|
||||
Reference in New Issue
Block a user