cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Header is missing in HTTPS request reply API call

ErikDM
Explorer
5,965

I'm sending a request with 4 Headers:

- Date: 2020-07-06T13:05:56Z

- Authorization: Bearer access token
- Accept: application/vnd.api+json

- Digest: SHA512(raw_payload)
- Signature: BASE64(RSA_SHA256_SIGN(PRIVATE_KEY,SIGNING_STRING))

But the target system does not receive my date-header that is required?

Is there anyone who can me help out here why this header is not sended???

Accepted Solutions (0)

Answers (9)

Answers (9)

Sriprasadsbhat
Active Contributor

Hello Erik,

Hope you are using SAP Cloud Platform Integration ( from your question subject line ).If yes then navigate to Runtime Configuration and enable the headers you want to receive from or send to 3rd party systems( i have updated * which allows all the headers ,for your case may be you can put Date ).

Regards,

Sriprasad Shivaram Bhat

Frank_Hinrichsen
Explorer
0 Likes

Hi,

I now encounter the same issue with cache-control and pragma header parameters.

Anyone managed to fix this within SCPI?

My next step would be to create custom parameters for those and ask consumers to use those instead.

Br Frank.

Clen
Participant
0 Likes

Hi Erik,

Have you got a solution for this issue?

I am facing the same issue "Date" as header.

Regards,

Alexander

ErikDM
Explorer
0 Likes

Hi Alexander,

No solution from SAP for this issue, they block the date header.

In my case the target system made some changes that don't needs the date header any more.

You can try to bypass with a request true a groovy script (this might work maybe for you)

Erik.

Sriprasadsbhat
Active Contributor
0 Likes

Hello Erik,

As per my understanding there are no other settings which can be done from developer side.

Appreciate if you could raise a ticket to LOD-HCI-PI-CON and our development colleagues will help you on the resolution part.

Regards,

Sriprasad Shivaram Bhat

das_sappo
Participant
0 Likes

Hi Sriprasad,

Is there any solution from SAP ?

I am passing a header field - "ConsumerId" but, getting 400 error - "Missing required header 'ConsumerId'. See documentation."

ErikDM
Explorer
0 Likes

Hi,

The Http HeaderFilterStrategy of the SAP-CPI camel framework filters out all the general http headers.
All other headers are converted to HTTP headers in the target message, with the exception of the following headers, which are blocked (based on a case-insensitive match):
content-length content-type cache-control connection date pragma trailer transfer-encoding upgrade via warning

Is there a possibility to override this settings???

I really need the Date-header for my request!

Regards,
Erik

maik_bosch
Contributor
0 Likes

Hi erik.demeyer

in general you can add allowed headers here:

BR

Maik

Sriprasadsbhat
Active Contributor
0 Likes

Hello Eric,

Please check with your 3rd party system if they have any place enable these headers.From SAP CPI side whatever the headers that is shown in Trace would be sent as is so may be you can check quickly posting the same data using Postman or any other HTTP client.

Regards,

Sriprasad Shivaram Bhat

ErikDM
Explorer
0 Likes

Postman sends the request with Date-header correctly to the 3th party application.

While doing a test with a dummy iFlow we try to send 2 header:
Date & Date1

Result:
Only Date1 is accessible in the dummy iFlow!

Conclusion:
The problem is inside SAP CPI
that is blocking the use of this header

Regards,
Erik

ErikDM
Explorer
0 Likes

Hi,
The Http HeaderFilterStrategy of the SAP-CPI camel framework filters out all the general http headers.
All other headers are converted to HTTP headers in the target message, with the exception of the following headers, which are blocked (based on a case-insensitive match):
content-length content-type cache-control connection date pragma trailer transfer-encoding upgrade via warning

Is there a possibility to override this settings???

I really need the Date-header for my request!

Regards,
Erik

ErikDM
Explorer
0 Likes

Hi Sriprasad,

Thanks for your reply, but that is not the problem.

Step 1 = Building the Date Header

Step 2 = Request Reply

Message content in HTTPS request:

Unfortunately i get a response back that there is a missing mandatory header missing: Date

Hope someone can help me out here.

Regards,
Erik.

Sriprasadsbhat
Active Contributor
0 Likes

Hello Erik,

First part is your target system should send the response back to you with populating this header.If you perform the setting I have suggested in earlier comment then SAP CPI will not truncate the header you want to retain and it should be available for you in the response.

Also please update the screenshots as couple of them are not visible or properly updated.

If you want to retain this header in SAP CPI then store it to Property before your request step so that it willnot be vanished after your request reply.

Regards,

Sriprasad Shivaram Bhat

ErikDM
Explorer
0 Likes

Hi Sriprasad,

Thanks for your reply, but that is not the problem.

The target system does not receive the header Date (all other headers they receive correctly)

Although i am sending also the Date-header.

See information i posted.

Regards,

Erik