You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/02/19 08:57:45 UTC

[3/4] camel git commit: Consistently normalizing paths as Undertow expects both during startup and shutdown

Consistently normalizing paths as Undertow expects both during startup and shutdown


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/36032729
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/36032729
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/36032729

Branch: refs/heads/master
Commit: 36032729b785bd17ca478db6ff21fd66f7d81ad0
Parents: b6ee9c4
Author: Scott Cranton <sc...@cranton.com>
Authored: Sat Feb 18 18:19:00 2017 -0500
Committer: Scott Cranton <sc...@cranton.com>
Committed: Sat Feb 18 18:19:00 2017 -0500

----------------------------------------------------------------------
 .../camel/component/undertow/handlers/CamelRootHandler.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/36032729/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/CamelRootHandler.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/CamelRootHandler.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/CamelRootHandler.java
index ef7e290..fe7c484 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/CamelRootHandler.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/handlers/CamelRootHandler.java
@@ -36,7 +36,7 @@ public class CamelRootHandler implements HttpHandler {
     }
 
     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;
@@ -166,8 +166,8 @@ public class CamelRootHandler implements HttpHandler {
 
     private String getBasePath(String path) {
         if (path.contains("{")) {
-            return PathTemplate.create(path).getBase();
+            path = PathTemplate.create(path).getBase();
         }
-        return path;
+        return URLUtils.normalizeSlashes(path);
     }
 }