Fix http-ssl example: remove bridgeEndpoint causing doubled /ping/ping path - #194
Open
Croway wants to merge 1 commit into
Open
Fix http-ssl example: remove bridgeEndpoint causing doubled /ping/ping path#194Croway wants to merge 1 commit into
Croway wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HttpSslClientRoutercalled.to("https://localhost:8443/ping?bridgeEndpoint=true")from adirect:route fed by arest().get("ping")consumer.bridgeEndpoint=trueonly controls whether theCamelHttpUriheader overrides the producer's configured base URI — it does not stop theCamelHttpPathheader (set to/pingby the inbound platform-http consumer) from being unconditionally appended inHttpHelper.createURL(camel-http-common). Every call therefore hithttps://localhost:8443/ping/ping, got a 404 from the server, and the client wrapped that into a 500 back to the caller.bridgeEndpoint=true(the producer URI is already fully static — nothing needs bridging) and strip the inboundCamelHttp*headers before the producer call, since a plain static call doesn't need any of them forwarded.Test plan
ssl-server+ssl-client(default, one-way SSL) —curl http://localhost:8080/ping→200 pongssl-server+ssl-clientwith-Ptwoways(mutual TLS) —curl http://localhost:8080/ping→200 pongssl-camel-server(Undertow) +ssl-client—curl http://localhost:8080/ping→200 pong🤖 Generated with Claude Code
https://claude.ai/code/session_015D2Ayyr8bDqenLgLpcgH4K