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 2015/09/23 13:51:55 UTC

camel git commit: CAMEL-8545: camel-swagger-java to run outside servlet - work in progress

Repository: camel
Updated Branches:
  refs/heads/master 2a9dbacff -> 452f8109a


CAMEL-8545: camel-swagger-java to run outside servlet - work in progress


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

Branch: refs/heads/master
Commit: 452f8109a64827b47970c5102278b4e07e8c9bc8
Parents: 2a9dbac
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Sep 23 13:53:25 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Sep 23 13:53:25 2015 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/component/rest/RestApiEndpoint.java | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/452f8109/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java
index 083034e..e2a0178 100644
--- a/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java
@@ -144,13 +144,9 @@ public class RestApiEndpoint extends DefaultEndpoint {
         if (factory != null) {
 
             // if no explicit port/host configured, then use port from rest configuration
-            String scheme = "http";
             String host = "";
             int port = 80;
 
-            if (config.getScheme() != null) {
-                scheme = config.getScheme();
-            }
             if (config.getHost() != null) {
                 host = config.getHost();
             }
@@ -168,7 +164,8 @@ public class RestApiEndpoint extends DefaultEndpoint {
                 }
 
                 // no host was configured so calculate a host to use
-                String targetHost = scheme + "://" + host + (port != 80 ? ":" + port : "");
+                // there should be no schema in the host (but only port)
+                String targetHost = host + (port != 80 ? ":" + port : "");
                 getParameters().put("host", targetHost);
             }