Fix AntPathMatcher rule for combining with extensions

Before this fix AntPathMatcher had a special rule for combining
patterns with wildcards and extensions as follows:

"/*.*"  + "/*.html" => "/*.html"

This change ensures this rule never applies if the first pattern
contains URI variables.

Issue: SPR-10062
This commit is contained in:
Rossen Stoyanchev
2013-02-15 12:25:25 -05:00
parent 4cc30fe541
commit 33e723b4a8
2 changed files with 5 additions and 2 deletions

View File

@@ -412,6 +412,7 @@ public class AntPathMatcherTests {
assertEquals("/*.html", pathMatcher.combine("/*.*", "/*.html"));
assertEquals("/{foo}/bar", pathMatcher.combine("/{foo}", "/bar")); // SPR-8858
assertEquals("/user/user", pathMatcher.combine("/user", "/user")); // SPR-7970
assertEquals("/{foo:.*[^0-9].*}/edit/", pathMatcher.combine("/{foo:.*[^0-9].*}", "/edit/")); // SPR-10062
}
@Test