PathContainer parses URL paths only

Collapse non-URL vs URL based path parsing into one essentially
supporting URL paths only.
This commit is contained in:
Rossen Stoyanchev
2017-07-31 22:10:08 +02:00
parent af83d2332a
commit f813a63fd8
12 changed files with 70 additions and 129 deletions

View File

@@ -79,7 +79,7 @@ public interface ServerRequest {
* Return the request path as {@code PathContainer}.
*/
default PathContainer pathContainer() {
return PathContainer.parseUrlPath(path());
return PathContainer.parsePath(path());
}
/**

View File

@@ -142,7 +142,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
int queryIndex = getQueryIndex(uriString);
String lookupPath = uriString.substring(0, queryIndex);
String query = uriString.substring(queryIndex);
PathContainer parsedLookupPath = PathContainer.parseUrlPath(lookupPath);
PathContainer parsedLookupPath = PathContainer.parsePath(lookupPath);
if (logger.isTraceEnabled()) {
logger.trace("Getting resource URL for lookup path \"" + lookupPath + "\"");
}