Repository: camel Updated Branches: refs/heads/camel-2.16.x 2a7e275ed -> 8466cc245 refs/heads/master b8b8c4d93 -> 6a9c07cad
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/e5b6e370 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e5b6e370 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e5b6e370 Branch: refs/heads/master Commit: e5b6e370c112e10f60e3b60f10791761ca0ede1d Parents: b8b8c4d Author: Claus Ibsen <[email protected]> Authored: Fri Jan 8 13:23:59 2016 +0100 Committer: Claus Ibsen <[email protected]> Committed: Fri Jan 8 13:23:59 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/e5b6e370/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/e5b6e370/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/e5b6e370/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/e5b6e370/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/e5b6e370/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);
