henrik242 opened a new pull request, #26986: URL: https://github.com/apache/camel/pull/26986
https://issues.apache.org/jira/browse/CAMEL-25085 Since CAMEL-24001, a verb under json binding that declares a non-json `produces` and returns a body without a Content-Type gets `application/json`, and the body goes through the json marshaller. A binary body then fails with an empty 500. `ensureHeaderContentType` now picks from the declared `produces`: the first json entry if json is wanted, else the first xml entry if xml is wanted, else the first entry. `application/json`/`application/xml` is only the fallback when `produces` is not set. Both CAMEL-24001 fixes are kept. `VertxPlatformHttpRestBindingProducesTest` covers binary bodies with `produces("application/octet-stream")` and a `text/plain` verb with a json Accept header, both failing before this change. It also pins the multi-value and no-`produces` cases. -- 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]
