[
https://issues.apache.org/jira/browse/CAMEL-17470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17472622#comment-17472622
]
Deepak edited comment on CAMEL-17470 at 1/11/22, 10:15 AM:
-----------------------------------------------------------
[~davsclaus] Thanks for the quick response.
I have tried converting the binary data to byte[]
<camel:convertBodyTo id="ConvertPayloadtoStringforPostCall" type="byte[]"/>
but I still see asynchttpclient sending transfer-encoding: chuncked in Request
header
2022 01 11
10:04:52#+00#DEBUG#org.asynchttpclient.netty.handler.HttpHandler##I323559#AHC-NETTY-COMMON-1-22###wr82yw04j0#na#na#na#na#
Request DefaultHttpRequest(decodeResult: success, version: HTTP/1.1)
POST
/personal/_api/web/lists/getbytitle('Documents')/rootfolder/files/add(url='picture.png',overwrite=true)
HTTP/1.1
Authorization: Bearer ***
Content-Type: image/png
*transfer-encoding: chunked*
host: new-my.sharepoint.com
accept: */*
user-agent: AHC/2.1
was (Author: deepaktaker):
[~davsclaus] Thanks for the quick response.
I have tried converting the binary data to byte[]
<camel:convertBodyTo id="ConvertPayloadtoStringforPostCall" type="byte[]"/>
but I still see asynchttpclient sending transfer-encoding: chuncked in Request
header
2022 01 11
10:04:52#+00#DEBUG#org.asynchttpclient.netty.handler.HttpHandler##I323559#AHC-NETTY-COMMON-1-22###wr82yw04j0#na#na#na#na#
Request DefaultHttpRequest(decodeResult: success, version: HTTP/1.1)
POST
/personal/_api/web/lists/getbytitle('Documents')/rootfolder/files/add(url='picture.png',overwrite=true)
HTTP/1.1
Authorization: Bearer ***
Content-Type: image/png
*transfer-encoding: chunked*
host: new-my.sharepoint.com
accept: *{*}/*{*}
user-agent: AHC/2.1
> camel-ahc - Binary file upload fails to the target system
> ---------------------------------------------------------
>
> Key: CAMEL-17470
> URL: https://issues.apache.org/jira/browse/CAMEL-17470
> Project: Camel
> Issue Type: Improvement
> Components: camel-ahc
> Reporter: Deepak
> Priority: Major
>
> Binary file upload fails to the target system because the target system
> doesn't understand Transfer-Encoding: chunked header which is sent by default
> by netty is bundled by camel-ahc.
> The target system expects the Content-Length header but there is no way to
> disable camel-ahc from sending data in chunks for binary content.
> I think this is a big issue. at least there should be a property to enable or
> disable camel-ahc from sending chunked data to the target.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)