-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
nbank opened SPR-13311 and commented
In org.springframework.web.util.UriComponents#NAMES_PATTERN the following Pattern is used: {([^/]+?)}
If you use Path-Variables like myurl/{name:[a-z]{1,5}}/show so accept only 5 lower case letters, then the UriCompents work wrong, because it will expand for name=test to myurl/test}/show which is wrong.
One Workaround is to cleanup the url before with
url.replaceAll("\\{([A-Za-z0-9_-]+?):([^{}]+?\\{[0-9,]+?\\})*([^{}]+)*\\}", "{$1}");Affects: 4.1.7
Issue Links:
- UriTemplate should support regex matching with n times {n} pattern [SPR-13627] #18205 UriTemplate should support regex matching with n times {n} pattern
Referenced from: commits 2e79a30
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement