cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer_Encoding Header causing Iflow failure in CPI

08-24-2021 10:13 AM
sugata_bagchi2 Active Contributor
2311 views 1 comments
0 Likes
SAP Managed Tags
Subscribe

Hello Experts,

I am trying to PUT a XML by calling the AWS S3 presigned URL and getting a response below on the mentioned header -

X-Amzn-Trace-Id: Root=1-61248d74-43...
        HTTPResponseHeaders = Connection: close
Content-Type: application/xml
Date: Tue, 24 Aug 2021 06:11:00 GMT
Server: AmazonS3
Transfer-Encoding: chunked
x-amz-id-2: F+eKbSBx78m/dZafx2Nd0xPdpsLQmolaFLTmXe8w1C0puQgnLnC4YgTgj12EA9gZLDDpRDIOvSk=
x-amz-request-id: DWS2971Z76RRB32H
        HTTPStatusCode      = 501
        ModelStepId         = MessageFlow_7031764
        ResponseBody        = <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NotImplemented</Code><Message>A header you provided implies functionality that is not implemented</Message><Header>Transfer-Encoding</Header><RequestId>DWS2971Z76RRB32H</RequestId><HostId>F+eKbSBx78m/dZafx2Nd0xPdpsLQmolaFLTmXe8w1C0puQgnLnC4YgTgj12EA9gZLDDpRDIOvSk=</HostId></Error>
        StepId           

AFAIK, CPI's HTTP receiver adapter runs on HTTP1.1 and the documentation says the following -

HTTP Receiver Adapter
Use the HTTP receiver adapter to communicate with target systems using HTTP message
protocol.
The HTTP adapter supports only HTTP 1.1. This means
that the target system must support chunked transfer encoding and may not rely on the
existence of the HTTP Content-Length header. 

As a result, the header is added at the very last step before the request-reply step. But , My scenario is failing, when the response is coming from AWS S3.
I have even tried by printing the headers available before call the request -reply and can not see any Transfer -Encoding is added , but still getting this error.
This is working totally fine using Postman.

P.S - I am already providing the below headers -

Host,Content-type,Content -length

Please refer the below links -

https://answers.sap.com/questions/13205755/http-receiver-channel-disable-chunking.html

https://answers.sap.com/questions/149441/how-to-disable-transferring-data-chunk-by-chunk-in.html

Please see the attached images for ref.

Could anyone please let me know how to address this ? how to remove the transfer-encoding header?

Thanks

Sugata

0 Likes

Accepted Solutions (0)

Answers (0)