Skip to content

Fix http-ssl example: remove bridgeEndpoint causing doubled /ping/ping path - #194

Open
Croway wants to merge 1 commit into
mainfrom
fix/http-ssl-double-path
Open

Fix http-ssl example: remove bridgeEndpoint causing doubled /ping/ping path#194
Croway wants to merge 1 commit into
mainfrom
fix/http-ssl-double-path

Conversation

@Croway

@Croway Croway commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • HttpSslClientRouter called .to("https://localhost:8443/ping?bridgeEndpoint=true") from a direct: route fed by a rest().get("ping") consumer. bridgeEndpoint=true only controls whether the CamelHttpUri header overrides the producer's configured base URI — it does not stop the CamelHttpPath header (set to /ping by the inbound platform-http consumer) from being unconditionally appended in HttpHelper.createURL (camel-http-common). Every call therefore hit https://localhost:8443/ping/ping, got a 404 from the server, and the client wrapped that into a 500 back to the caller.
  • Confirmed this is original Camel HTTP producer behavior going back to the component's earliest history, not a version regression — servers work fine when hit directly, and all three documented scenarios (one-way SSL, two-way SSL, Undertow server) were affected identically since they share the same client router.
  • Fix: drop bridgeEndpoint=true (the producer URI is already fully static — nothing needs bridging) and strip the inbound CamelHttp* headers before the producer call, since a plain static call doesn't need any of them forwarded.

Test plan

  • Ran ssl-server + ssl-client (default, one-way SSL) — curl http://localhost:8080/ping200 pong
  • Ran ssl-server + ssl-client with -Ptwoways (mutual TLS) — curl http://localhost:8080/ping200 pong
  • Ran ssl-camel-server (Undertow) + ssl-clientcurl http://localhost:8080/ping200 pong

🤖 Generated with Claude Code

https://claude.ai/code/session_015D2Ayyr8bDqenLgLpcgH4K

…g path

HttpSslClientRouter used bridgeEndpoint=true on a producer with a static
URI (https://localhost:8443/ping). bridgeEndpoint only controls whether
the CamelHttpUri header is used as the request base; it does not stop
the CamelHttpPath header (set by the inbound platform-http consumer to
/ping) from being unconditionally appended in HttpHelper.createURL. The
result was every request going to /ping/ping, a 404 from the server,
and a 500 back to the caller for all three documented scenarios
(one-way SSL, two-way SSL, Undertow server).

Dropping bridgeEndpoint and stripping the inbound CamelHttp* headers
before the producer call avoids the append. Verified curl
http://localhost:8080/ping returns 200/pong for all three scenarios.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015D2Ayyr8bDqenLgLpcgH4K
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant