Direct matches by URL path work again
This commit fixes a recent regression as a result of 5225a57411
with the determination of non-pattern vs pattern URLs. That in turn affects the ability to perform
direct matches by URL path.
There is also a fix in PathPattern to recognize "catch-all" patterns as pattern syntax.
See gh-24945
This commit is contained in:
@@ -48,6 +48,12 @@ public class PathPatternsRequestConditionTests {
|
||||
.isEqualTo("");
|
||||
}
|
||||
|
||||
@Test
|
||||
void getDirectUrls() {
|
||||
PathPatternsRequestCondition condition = createCondition("/something", "/else/**");
|
||||
assertThat(condition.getDirectPaths()).containsExactly("/something");
|
||||
}
|
||||
|
||||
@Test
|
||||
void combineEmptySets() {
|
||||
PathPatternsRequestCondition c1 = createCondition();
|
||||
|
||||
@@ -47,6 +47,12 @@ class PatternsRequestConditionTests {
|
||||
.isEqualTo("");
|
||||
}
|
||||
|
||||
@Test
|
||||
void getDirectUrls() {
|
||||
PatternsRequestCondition condition = new PatternsRequestCondition("/something", "/else/**");
|
||||
assertThat(condition.getDirectPaths()).containsExactly("/something");
|
||||
}
|
||||
|
||||
@Test
|
||||
void combineEmptySets() {
|
||||
PatternsRequestCondition c1 = new PatternsRequestCondition();
|
||||
|
||||
Reference in New Issue
Block a user