[ https://issues.apache.org/jira/browse/JCRVLT-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16066651#comment-16066651 ]
Tobias Bocanegra commented on JCRVLT-186: ----------------------------------------- good catch! I needed to add the filename parameter for the un-chunked test (see diff above). that's probably why it worked. I tried to add the filename parameter for the chunked case: {noformat} diff --git a/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/Utils.java b/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/Utils.java index e4ddbf261..7fd552700 100644 --- a/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/Utils.java +++ b/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/Utils.java @@ -27,6 +27,7 @@ import javax.jcr.RepositoryException; import org.apache.http.entity.ContentType; import org.apache.http.entity.mime.FormBodyPart; import org.apache.http.entity.mime.FormBodyPartBuilder; +import org.apache.http.entity.mime.content.ByteArrayBody; import org.apache.http.entity.mime.content.InputStreamBody; import org.apache.http.entity.mime.content.StringBody; import org.apache.jackrabbit.commons.json.JsonUtil; @@ -98,7 +99,7 @@ final class Utils { switch (value.getType()) { case PropertyType.BINARY: binaries.add(value); - part = builder.setBody(new InputStreamBody(value.getStream(), ctype)).build(); + part = builder.setBody(new InputStreamBody(value.getStream(), ctype, paramName)).build(); break; case PropertyType.NAME: part = builder.setBody(new StringBody(resolver.getJCRName(value.getName()), ctype)).build(); {noformat} and now it works! > rcp fails to copy binaries correctly > ------------------------------------ > > Key: JCRVLT-186 > URL: https://issues.apache.org/jira/browse/JCRVLT-186 > Project: Jackrabbit FileVault > Issue Type: Bug > Components: RCP > Affects Versions: 3.1.38 > Reporter: Tobias Bocanegra > Priority: Critical > Attachments: 3.1.41_with_chunked.png, 3.1.41_without_chunked.png > > > coping a binary, eg. an image results in data corruption, probably dues to > wrong charset setting in the webdav POST: > {noformat}2017-06-28T15:01:31.114+09:00 > --PuVe35GoHu1NaGvsEEeuI3O1LXf5jbJ > Content-Disposition: form-data; > name="/content/dam/dst/test.png/jcr:content/renditions/cq5dam.web.1280.1280.png/jcr:content/jcr:data" > Content-Type: jcr-value/binary; charset=UTF-8 > Content-Transfer-Encoding: binary > ‰PNG > .... > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)