To make the switching of separators complete, it is also important to
know whether the decoding of path segment values and the parsing of
path param should be done as those are applied transparently.
This commit replaces the recently added separator argument to
PathContainer.parsePath with an Options type with two predefined
constants. One for HTTP URLs with automatic decoding and parsing of
path params, and another for "." separated message routes without
decoding except for encoded sequences of the separator itself.
See gh-23310
@ -72,10 +79,10 @@ final class DefaultPathContainer implements PathContainer {
@@ -72,10 +79,10 @@ final class DefaultPathContainer implements PathContainer {
@ -89,18 +96,19 @@ final class DefaultPathContainer implements PathContainer {
@@ -89,18 +96,19 @@ final class DefaultPathContainer implements PathContainer {
@ -110,23 +118,25 @@ final class DefaultPathContainer implements PathContainer {
@@ -110,23 +118,25 @@ final class DefaultPathContainer implements PathContainer {
@ -192,6 +202,30 @@ final class DefaultPathContainer implements PathContainer {
@@ -192,6 +202,30 @@ final class DefaultPathContainer implements PathContainer {
@ -202,14 +236,29 @@ final class DefaultPathContainer implements PathContainer {
@@ -202,14 +236,29 @@ final class DefaultPathContainer implements PathContainer {
@ -235,10 +284,10 @@ final class DefaultPathContainer implements PathContainer {
@@ -235,10 +284,10 @@ final class DefaultPathContainer implements PathContainer {
@ -100,8 +100,8 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -100,8 +100,8 @@ public class PathPattern implements Comparable<PathPattern> {
/** The parser used to construct this pattern. */
privatefinalPathPatternParserparser;
/** The separator used when parsing the pattern. */
privatefinalcharseparator;
/** The options to use to parse a pattern. */
privatefinalPathContainer.OptionspathOptions;
/** If this pattern has no trailing slash, allow candidates to include one and still match successfully. */
@ -146,7 +146,7 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -146,7 +146,7 @@ public class PathPattern implements Comparable<PathPattern> {
@ -340,7 +340,7 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -340,7 +340,7 @@ public class PathPattern implements Comparable<PathPattern> {
@ -401,7 +401,7 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -401,7 +401,7 @@ public class PathPattern implements Comparable<PathPattern> {
// /hotels + /booking => /hotels/booking
// /hotels + booking => /hotels/booking
intstarDotPos1=this.patternString.indexOf("*.");// Are there any file prefix/suffix things to consider?
@ -428,13 +428,13 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -428,13 +428,13 @@ public class PathPattern implements Comparable<PathPattern> {
@ -461,7 +461,7 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -461,7 +461,7 @@ public class PathPattern implements Comparable<PathPattern> {
}
chargetSeparator(){
returnthis.separator;
returnthis.pathOptions.separator();
}
intgetCapturedVariableCount(){
@ -506,8 +506,8 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -506,8 +506,8 @@ public class PathPattern implements Comparable<PathPattern> {
@ -515,7 +515,7 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -515,7 +515,7 @@ public class PathPattern implements Comparable<PathPattern> {
returnpath1+path2;
}
else{
returnpath1+this.separator+path2;
returnpath1+getSeparator()+path2;
}
}
@ -534,7 +534,7 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -534,7 +534,7 @@ public class PathPattern implements Comparable<PathPattern> {
@ -37,21 +37,32 @@ public class PathPatternRouteMatcher implements RouteMatcher {
@@ -37,21 +37,32 @@ public class PathPatternRouteMatcher implements RouteMatcher {