davsclaus opened a new pull request, #26167:
URL: https://github.com/apache/camel/pull/26167

   ## Summary
   
   Fixes `SSLException: Unsupported or unrecognized SSL message` when calling 
an `https://` endpoint via an HTTP proxy using the `camel-http` component.
   
   ### Root cause
   
   `HttpComponent.configureHttpProxy()` was deriving the proxy connection 
scheme from the **target endpoint** scheme (`secure ? "https" : "http"`). This 
is wrong: the proxy connection scheme is independent of the target — connecting 
to an HTTPS target through an HTTP proxy uses a plain HTTP `CONNECT` tunnel, 
with TLS established end-to-end inside that tunnel.
   
   The same bug existed in the deprecated `CamelContext` global options path in 
`HttpEndpoint`.
   
   ### Fix
   
   - `HttpComponent`: default `proxyAuthScheme` to `"http"` unconditionally
   - `HttpEndpoint`: same fix for the deprecated `http.proxyScheme` global 
option path
   - `HttpCommonEndpoint` / `HttpConfiguration`: add `defaultValue = "http"` 
and improve description so tooling surfaces the correct default
   - Catalog and DSL regenerated
   
   ### Workaround (before this fix)
   
   Set `proxyAuthScheme=http` explicitly in the endpoint URI:
   ```
   https://www.example.com?proxyHost=myproxy&proxyPort=8080&proxyAuthScheme=http
   ```
   
   ### Test
   
   Added `httpsTargetWithProxyDefaultsToHttpProxyScheme()` to 
`HttpProxyServerTest` to verify that a proxy configured for an `https://` 
target gets scheme `"http"`.
   
   _Claude Code on behalf of davsclaus_


-- 
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]

Reply via email to