Calle Andersson created CAMEL-24409:
---------------------------------------
Summary: Binary data corrupted by rest client request validator
Key: CAMEL-24409
URL: https://issues.apache.org/jira/browse/CAMEL-24409
Project: Camel
Issue Type: Bug
Affects Versions: 4.21.0
Environment: The problem was discovered using Camel Quarkus 3.38.0
(which uses Camel 4.21.0) but according to the Zulip discussion it is a general
Camel issue.
Reporter: Calle Andersson
Binary data may get corrupted when client request validation is enabled. This
was detected using Rest DSL with contract first OpenAPI and an OpenAPI
specification which specifies an endpoint handling incoming binaray data
(accepting "application/octet-stream"). A lot of the data content was replaced
with � /{{{}EF BF BD{}}}.
This was initially discussed in a
[Zulip-conversation|https://camel.zulipchat.com/#narrow/channel/257302-camel-quarkus/topic/Binary.20data.20issue.20using.20Rest.20DSL/with/617455026]
and according to James Netherton it is likely a bug here ({_}"Needlessly,
setting the exchange message body to a string based version and erasing the
original binary payload."{_}):
[DefaultRestClientRequestValidator.java#L78-L81|https://github.com/apache/camel/blob/ca11b8250b66722c69509ed5074ac5b6a6000141/core/camel-support/src/main/java/org/apache/camel/support/processor/DefaultRestClientRequestValidator.java#L78-L81]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)