davsclaus opened a new pull request, #24925: URL: https://github.com/apache/camel/pull/24925
_Claude Code on behalf of davsclaus_ ## Summary Fix `DefaultCxfRsBinding.contentLanguage` instance field that latched the first request's `Content-Language` value and reused it for all subsequent requests, ignoring per-request headers. - **Root cause:** The "polish up" commit for CAMEL-16460 (`e96225adbabe`) turned a local variable into an instance field. Since `DefaultCxfRsBinding` is shared across all exchanges, the `contentLanguage == null` guard meant only the first request ever read the header. - **Fix:** Made `contentLanguage` a local variable (per-request) and replaced the `AbstractClient.getState()` reflection hack with the public `webClient.getHeaders()` API, which returns the same data without `setAccessible(true)`. - Removed unused imports: `AbstractClient`, `ClientState` ## Test plan - [x] Added `testContentLanguagePerRequest` — two sequential calls on the same binding with `fr` then `de`; verifies each request uses its own Content-Language (previously the second call returned `en`) - [x] Added `testContentLanguageDefaultsToUS` — verifies fallback to `Locale.US` when no WebClient or no Content-Language header - [x] All existing `DefaultCxfRsBindingTest` tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.6 <[email protected]> -- 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]
