davsclaus opened a new pull request, #27131: URL: https://github.com/apache/camel/pull/27131
_Claude Code on behalf of davsclaus_ [CAMEL-25188](https://issues.apache.org/jira/browse/CAMEL-25188) Since CAMEL-24524 (#25810, on main only and not released), the fast path of `URISupport.normalizeUri` writes a space in a query value as `%20`. The complex path, used for URIs with `%` or unsafe characters, writes it as `+`. So normalizing a normalized URI changed it, and the same endpoint got a different key depending on how it was written: | URI | key before this PR | key in 4.22.1 and with this PR | |---|---|---| | `log:foo?marker=a+b` | `log://foo?marker=a%20b` | `log://foo?marker=a+b` | | `log:foo?marker=a%20b` | `log://foo?marker=a+b` | `log://foo?marker=a+b` | | `log:foo?marker=a b` | `log://foo?marker=a+b` | `log://foo?marker=a+b` | The endpoint got the same value (`a b`) in every case; only the keys differed, so endpoint registry and cache lookups could miss. The fix writes a space as `+` in the fast path as well, as the complex path and all released versions do. The fast parser only takes URIs without `%`, so a `%20` it produces is always a space. ### Tests - `URISupportTest`: every spelling of a space normalizes the same, and normalizing twice gives the same URI (13 URIs, fast and complex paths, RAW, repeated keys) - camel-util: 242 tests - camel-core URI, endpoint and properties tests: 222 tests - camel-quartz, whose cron expressions use `+` for spaces: 89 tests Not changed here: an encoded plus (`%2B`) still reaches the endpoint as a space, as in every release since at least 4.10. That is older behaviour and needs its own decision. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
