Croway opened a new pull request, #27288: URL: https://github.com/apache/camel/pull/27288
Backport of #26986 (CAMEL-25085) to `camel-4.18.x`. https://issues.apache.org/jira/browse/CAMEL-25085 Under json or xml binding, a response without a Content-Type header again takes it from the `produces` of the rest verb, as before 4.18.4 (CAMEL-24001). A verb that `produces("application/octet-stream")` under `bindingMode(json)` no longer answers an empty 500, and a `text/plain` verb called with a json Accept header answers plain text again. Cherry-pick of 4767770cff69f14481abc43441ab98545d8ac590. The code hunk and the camel-core test applied without conflicts. Two adaptations compared to the original PR: - `VertxPlatformHttpRestBindingProducesTest` calls `context.start()` instead of `VertxPlatformHttpEngineTest.startCamelContext(context)`, because that helper does not exist on 4.18.x (the 4.18.x `createCamelContext()` already sets the RestAssured port). Test-only, one line. - Upgrade guides: the note is kept in `camel-4x-upgrade-guide-4_18.adoc` under the existing "Upgrading from 4.18.4 to 4.18.5" section; the 4_22 and 4_23 guide edits are dropped as those files do not exist on this branch. Verified locally on this branch: `FromRestBindingProducesContentTypeTest` fails 2 of 5 without the fix (octet-stream and text/plain get `application/json`) and passes with it; `VertxPlatformHttpRestBindingProducesTest` passes. _Claude Code on behalf of Croway_ 🤖 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]
