cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP adapter - Content-Length Header not passed to Receiver

former_member522497
Participant
4,997

Hi Experts,

We are facing issues with a HTTP Receiver Adapter where the Content-Length header is visible in the trace in SAP CPI (MBC) tenant, but the value is not passed to the 3rd party system.

Could you please help me if I am missing anything in the iflow.

Please find the below screenshots.

Iflow:

In the content modifier, the headers are stored under the Message Header.

The incoming SOAP payload is signed used the XML signer.


The Content-Length value is calculated and stored as a header dynamically using a groovy script.

HTTP Adapter Channel:

The 3rd party system API is called using the HTTP receiver adapter with the following configuration.

We tried to add the headers in Request Headers section by giving a * and by separating the headers with ‘|’

The Content-Length header gets populated in the trace under headers as per groovy script.

Please let me know if any additional info is required.

sriprasad.shivarambhat sriprasadshivaramabhat deepakgovardhanrao.deshpande mandy.krimmel 7a519509aed84a2c9e6f627841825b5a please help

Thanks,

Ameer

Accepted Solutions (1)

Accepted Solutions (1)

Karunaharan
Product and Topic Expert
Product and Topic Expert

Hello ameerkhan,

This is a known thing with Cloud Integration. Please refer to the "Header Details" table in the official documentation for HTTP Receiver Adapter.
https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/Cloud/en-US/2da452effb764b3bb28f8e0a2f5...

Troubleshooting information for this issue is available in the Troubleshooting Guide for Cloud Integration.
https://ga.support.sap.com/dtp/viewer/#/tree/2065/actions/26547:26549:28901:28748:41513:41514:41518

Workaround:

  • You can use any other header name to pass the required information.
  • Content-Length header can be forced through a script which coverts stream type of body to String type. However this approach is vulnerable to encoding issues and is discouraged.

Hope this helps.

Regards,
Karuna

former_member522497
Participant
0 Kudos

Hi aeroknot ,

Thanks for the response.

I was passing the SOAP payload as String, Is it because of the XML signer used before the HTTP call which is not allowing the Content-Length header to the receiver system?

Does the XML signer transforms the payload from String to binary?

Regards,

Ameer

Karunaharan
Product and Topic Expert
Product and Topic Expert

Answers (1)

Answers (1)

Sriprasadsbhat
Active Contributor

Hello Ameer,

Configuration looks good and dont think there will be any issues on SAP CPI side.Could you please check any filters at receiver system network that might be truncating these headers.

Regards,

Sriprasad Shivaram Bhat

former_member522497
Participant
0 Kudos

Hi sriprasadshivaramabhat,

I have checked with the receiver system network, seems that they don't have any filters for headers.

All the other headers are passed in the receiver system except the content-length header.

Thanks,

Ameer