Avoid using regex for URL matching when possible

See gh-24887
This commit is contained in:
Vlad Kisel
2020-04-09 12:27:19 +02:00
committed by Brian Clozel
parent b1224835be
commit 9bfe410a0c
2 changed files with 44 additions and 7 deletions

View File

@@ -130,6 +130,9 @@ class AntPathMatcherTests {
assertThat(pathMatcher.match("", "")).isTrue();
assertThat(pathMatcher.match("/{bla}.*", "/testing.html")).isTrue();
// Test that sending the same pattern will not match (gh #24887)
assertThat(pathMatcher.match("/bla/{foo:[0-9]}", "/bla/{foo:[0-9]}")).isFalse();
}
@Test