This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f0d45775ba42847883f54449d823e4e7478c032c
Author: Zoran Regvart <[email protected]>
AuthorDate: Fri May 22 12:52:46 2020 +0200

    CAMEL-15099: Set ssl to true for https URLs
    
    This makes it easier to use the Netty HTTP producer with `https` URLs.
    Also provides symmetry with the behavior when used in the REST Producer
    contract.
---
 .../org/apache/camel/component/netty/http/NettyHttpComponent.java     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
index 92eb4ed..aae4ada 100644
--- 
a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
+++ 
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpComponent.java
@@ -228,6 +228,10 @@ public class NettyHttpComponent extends NettyComponent 
implements HeaderFilterSt
         configuration.setProtocol("tcp");
         configuration.setTextline(false);
 
+        if ("https".equals(uri.getScheme())) {
+            configuration.setSsl(true);
+        }
+
         if (configuration instanceof NettyHttpConfiguration) {
             final NettyHttpConfiguration httpConfiguration = 
(NettyHttpConfiguration) configuration;
 

Reply via email to