|
|
|
@ -259,13 +259,16 @@ public final class RequestKey { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String getMatchingPattern(String pattern, String lookupPath, PathMatcher pathMatcher) { |
|
|
|
private String getMatchingPattern(String pattern, String lookupPath, PathMatcher pathMatcher) { |
|
|
|
if (pattern.equals(lookupPath) || pathMatcher.match(pattern, lookupPath)) { |
|
|
|
if (pattern.equals(lookupPath)) { |
|
|
|
return pattern; |
|
|
|
return pattern; |
|
|
|
} |
|
|
|
} |
|
|
|
boolean hasSuffix = pattern.indexOf('.') != -1; |
|
|
|
boolean hasSuffix = pattern.indexOf('.') != -1; |
|
|
|
if (!hasSuffix && pathMatcher.match(pattern + ".*", lookupPath)) { |
|
|
|
if (!hasSuffix && pathMatcher.match(pattern + ".*", lookupPath)) { |
|
|
|
return pattern + ".*"; |
|
|
|
return pattern + ".*"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (pathMatcher.match(pattern, lookupPath)) { |
|
|
|
|
|
|
|
return pattern; |
|
|
|
|
|
|
|
} |
|
|
|
boolean endsWithSlash = pattern.endsWith("/"); |
|
|
|
boolean endsWithSlash = pattern.endsWith("/"); |
|
|
|
if (!endsWithSlash && pathMatcher.match(pattern + "/", lookupPath)) { |
|
|
|
if (!endsWithSlash && pathMatcher.match(pattern + "/", lookupPath)) { |
|
|
|
return pattern +"/"; |
|
|
|
return pattern +"/"; |
|
|
|
|