mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Fix '**' parsing within a PathPattern segment
Prior to this commit, a regexp path segment ending with a double wilcard
(like "/path**") would be incorrectly parsed as a double wildcard
segment ("/**").
This commit fixes the incorrect parsing.
Fixes gh-35339
This commit is contained in:
+6
-1
@@ -85,9 +85,14 @@ class PathPatternParserTests {
|
||||
|
||||
@Test
|
||||
void regexpSegmentIsNotWildcardSegment() {
|
||||
// this is not double wildcard, it's / then **acb (an odd, unnecessary use of double *)
|
||||
pathPattern = checkStructure("/**acb");
|
||||
assertPathElements(pathPattern, SeparatorPathElement.class, RegexPathElement.class);
|
||||
|
||||
pathPattern = checkStructure("/a**bc");
|
||||
assertPathElements(pathPattern, SeparatorPathElement.class, RegexPathElement.class);
|
||||
|
||||
pathPattern = checkStructure("/abc**");
|
||||
assertPathElements(pathPattern, SeparatorPathElement.class, RegexPathElement.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user