[ https://issues.apache.org/jira/browse/CAMEL-21505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17921764#comment-17921764 ]
Claus Ibsen commented on CAMEL-21505: ------------------------------------- Thanks I tried to backport, but testing locally I get a timeout error [INFO] --- failsafe:3.5.0:verify (integration-test) @ camel-as2 --- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Camel :: AS2 :: Parent 4.8.4-SNAPSHOT: [INFO] [INFO] Camel :: AS2 :: Parent ............................. SUCCESS [ 0.897 s] [INFO] Camel :: AS2 :: API ................................ SUCCESS [01:56 min] [INFO] Camel :: AS2 :: Component .......................... FAILURE [10:04 min] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ Without the PR then the 4.8.x branch can test success locally. > 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)