Claus Ibsen created CAMEL-26257:
-----------------------------------

             Summary: camel-alibaba-fc - invokeFunction corrupts a binary 
InputStream or File payload by converting it to a String
                 Key: CAMEL-26257
                 URL: https://issues.apache.org/jira/browse/CAMEL-26257
             Project: Camel
          Issue Type: Bug
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of alibaba-fc (CAMEL-24961, PR 
#28409).

h4. 1. A binary stream or File payload is corrupted

{{FCUtils.resolvePayload}} (main 2a465aa4814c, line 86) sends byte[] and String 
as is, but converts any other body with {{getMandatoryBody(String.class)}} and 
back to UTF-8 bytes, so a binary {{InputStream}}, {{File}} or {{GenericFile}} 
payload is changed (0xff becomes EF BF BD) without an error. Checked on 
4.24.0-SNAPSHOT with a Mockito client set on the endpoint.

Proposed: convert the other bodies with {{getMandatoryBody(byte[].class)}}.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to