seshuthota commented on code in PR #28265:
URL: https://github.com/apache/camel/pull/28265#discussion_r4361209018
##########
components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ClientConnection.java:
##########
@@ -99,6 +117,18 @@ public AS2ClientConnection(String as2Version, String
userAgent, String clientFqd
sslContext != null ? "https" : "http",
ObjectHelper.notNull(targetHostName, "targetHostName"),
ObjectHelper.notNull(targetPortNumber, "targetPortNumber"));
+ if (proxyHost != null) {
+ // the connection to the proxy itself is plain http, whatever the
target scheme: an https target is
+ // reached through a CONNECT tunnel
+ HttpHost proxy = new HttpHost("http", proxyHost,
ObjectHelper.notNull(proxyPort, "proxyPort"));
+ this.route = new HttpRoute(targetHost, null, proxy, sslContext !=
null);
+ if (proxyAuthUsername != null && proxyAuthPassword != null) {
Review Comment:
Good catch, thanks. Fixed in 5f9144ef5fad: setting only one of
`proxyAuthUsername` / `proxyAuthPassword` now fails with an
`IllegalArgumentException` instead of a warning. The endpoint creates its
client connection when it is configured, so the route fails at startup with a
clear message, the same way a missing `proxyPort` already does, rather than
starting and getting a 407 on the first send. The options are new in this PR,
so no existing configuration is affected. Added three tests, including one that
creates the endpoint.
_Claude Code on behalf of @seshuthota_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]