camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-8545: camel-swagger-java to run outside servlet - work in progress
Date Wed, 23 Sep 2015 11:51:55 GMT
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 <davsclaus@apache.org>
Authored: Wed Sep 23 13:53:25 2015 +0200
Committer: Claus Ibsen <davsclaus@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);
             }
 


Mime
View raw message