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 2016/01/08 13:44:10 UTC
[3/4] camel git commit: CAMEL-9492: camel-netty-http - The http/https
protocol should be mandatory
CAMEL-9492: camel-netty-http - The http/https protocol should be mandatory
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/245e14ea
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/245e14ea
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/245e14ea
Branch: refs/heads/camel-2.16.x
Commit: 245e14ea6e32712fb8c4f5d1b536f7e26cd6a71f
Parents: 2a7e275
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Jan 8 13:23:59 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jan 8 13:43:51 2016 +0100
----------------------------------------------------------------------
.../camel/component/netty/http/NettyHttpConfiguration.java | 2 +-
.../camel/component/netty/http/NettyDefaultProtocolTest.java | 2 +-
.../camel/component/netty4/http/NettyHttpConfiguration.java | 2 +-
.../camel/component/netty4/http/NettyDefaultProtocolTest.java | 2 +-
.../test/java/org/apache/camel/catalog/CamelCatalogTest.java | 5 +++--
5 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/245e14ea/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
index ed9638b..641f16f 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
@@ -34,7 +34,7 @@ import org.jboss.netty.handler.codec.frame.TooLongFrameException;
@UriParams
public class NettyHttpConfiguration extends NettyConfiguration {
- @UriPath(enums = "http,https", defaultValue = "http") @Metadata(required = "true")
+ @UriPath(enums = "http,https") @Metadata(required = "true")
private String protocol;
@UriPath @Metadata(required = "true")
private String host;
http://git-wip-us.apache.org/repos/asf/camel/blob/245e14ea/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyDefaultProtocolTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyDefaultProtocolTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyDefaultProtocolTest.java
index 4160538..07952dd 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyDefaultProtocolTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyDefaultProtocolTest.java
@@ -44,7 +44,7 @@ public class NettyDefaultProtocolTest extends BaseNettyTest {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
- from("netty-http:0.0.0.0:{{port}}/foo")
+ from("netty-http:http:0.0.0.0:{{port}}/foo")
.to("mock:input")
.transform().constant("Bye World");
}
http://git-wip-us.apache.org/repos/asf/camel/blob/245e14ea/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java
index 74c6f28..d9bbbbb 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpConfiguration.java
@@ -33,7 +33,7 @@ import org.apache.camel.spi.UriPath;
@UriParams
public class NettyHttpConfiguration extends NettyConfiguration {
- @UriPath(enums = "http,https", defaultValue = "http") @Metadata(required = "true")
+ @UriPath(enums = "http,https") @Metadata(required = "true")
private String protocol;
@UriPath @Metadata(required = "true")
private String host;
http://git-wip-us.apache.org/repos/asf/camel/blob/245e14ea/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyDefaultProtocolTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyDefaultProtocolTest.java b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyDefaultProtocolTest.java
index af1aa8a..d35eb7f 100644
--- a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyDefaultProtocolTest.java
+++ b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyDefaultProtocolTest.java
@@ -44,7 +44,7 @@ public class NettyDefaultProtocolTest extends BaseNettyTest {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
- from("netty4-http:0.0.0.0:{{port}}/foo")
+ from("netty4-http:http:0.0.0.0:{{port}}/foo")
.to("mock:input")
.transform().constant("Bye World");
}
http://git-wip-us.apache.org/repos/asf/camel/blob/245e14ea/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
----------------------------------------------------------------------
diff --git a/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java b/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
index 8132107..275d5c2 100644
--- a/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
+++ b/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
@@ -164,7 +164,8 @@ public class CamelCatalogTest {
@Test
public void testAsEndpointUriNetty4http() throws Exception {
Map<String, String> map = new HashMap<String, String>();
- // use default protocol
+ // use http protocol
+ map.put("protocol", "http");
map.put("host", "localhost");
map.put("port", "8080");
map.put("path", "foo/bar");
@@ -173,7 +174,7 @@ public class CamelCatalogTest {
String uri = catalog.asEndpointUri("netty4-http", map, true);
assertEquals("netty4-http:http:localhost:8080/foo/bar?disconnect=true", uri);
- // lets add a protocol
+ // lets switch protocol
map.put("protocol", "https");
uri = catalog.asEndpointUri("netty4-http", map, true);