Skip to content

Commit

Permalink
Consistently normalizing paths as Undertow expects both during startu…
Browse files Browse the repository at this point in the history
…p and shutdown
  • Loading branch information
scranton committed Feb 18, 2017
1 parent b6ee9c4 commit 3603272
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void handleRequest(HttpServerExchange exchange) throws Exception {
}

public synchronized void add(String path, String[] methods, boolean prefixMatch, HttpHandler handler) {
String basePath = URLUtils.normalizeSlashes(getBasePath(path));
String basePath = getBasePath(path);
HttpHandler basePathHandler = pathHandler.getHandler(basePath);

CamelMethodHandler targetHandler;
Expand Down Expand Up @@ -166,8 +166,8 @@ public String toString() {

private String getBasePath(String path) {
if (path.contains("{")) {
return PathTemplate.create(path).getBase();
path = PathTemplate.create(path).getBase();
}
return path;
return URLUtils.normalizeSlashes(path);
}
}

0 comments on commit 3603272

Please sign in to comment.