[ https://issues.apache.org/jira/browse/CAMEL-21505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-21505: ----------------------------------- Assignee: Jono Morris > camel-as2: Binary files get corrupt when using 'base64' content transfer > encoding > --------------------------------------------------------------------------------- > > Key: CAMEL-21505 > URL: https://issues.apache.org/jira/browse/CAMEL-21505 > Project: Camel > Issue Type: Bug > Components: camel-as2 > Affects Versions: 4.8.1 > Environment: Windows and Docker > Java 21 Temurin > Reporter: Meinolf S-D > Assignee: Jono Morris > Priority: Minor > Fix For: 4.8.4, 4.10.0 > > Attachments: image-2024-12-03-12-29-47-487.png, > image-2025-01-10-15-09-59-096.png > > > Binary files get corrupt when using *base64* content transfer encoding due to > String assignment of the decoded byte[] > This can easily be tested sending a .zip file to Camel AS2 listener. > After some investigation the issue seems to be in the EntityUtil.decode > method. > As shown in the screenshot the decoded (binary) byte[] is assigned to a new > String which result into corrupt date in case of binary content. > !image-2024-12-03-12-29-47-487.png! > In addition there are new line characters in the encoded base64 encoded > String data object. > In case of using transfer encoding type *binary* > java.nio.charset.MalformedInputException: Input length = 1 it thrown which > might be OK. -- This message was sent by Atlassian Jira (v8.20.10#820010)