This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new a237a242cf4 CAMEL-18310: (bug) Global SSL Context Params Force SSL for
All HTTP Connections (#8057)
a237a242cf4 is described below
commit a237a242cf4b5296aa5245bacd737628ba9a8e7c
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Jul 27 16:27:16 2022 +0200
CAMEL-18310: (bug) Global SSL Context Params Force SSL for All HTTP
Connections (#8057)
---
.../main/java/org/apache/camel/component/http/HttpComponent.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
index 94153901e37..12e434111d6 100644
---
a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
+++
b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
@@ -314,7 +314,11 @@ public class HttpComponent extends HttpCommonComponent
implements RestProducerFa
sslContextParameters = getSslContextParameters();
}
if (sslContextParameters == null) {
- sslContextParameters = retrieveGlobalSslContextParameters();
+ // only secure (https) should use global SSL
+ boolean secure = HttpHelper.isSecureConnection(uri);
+ if (secure) {
+ sslContextParameters = retrieveGlobalSslContextParameters();
+ }
}
String httpMethodRestrict = getAndRemoveParameter(parameters,
"httpMethodRestrict", String.class);