Closed AnnaLbr closed 2 months ago
Hi Anna, sorry you ran into this. This is something I was afraid might happen when discussing the "removeProperty" approach. The problem is that this currently leads to duplicate headers. Now, some systems ignore that, but it seems the cloud connector is more strict and doesn't allow this, even when header values are the same.
We'll look into a workaround / fix.
Hi again! Thanks for letting me know, so quick as well π Understanding the issue is important for now. We do not need to merge these changes soon.
Feel free to update me if you have a workaroud/fix.
Hi @AnnaLbr, glad to let you know this has been fixed with version 5.12.0. Please let us know if something doesn't work as expected π
@MatKuhr Thanks a lot, that didnt take long at all π I will let you know in cases of issues
Issue Description
Hello, recently we have been removing the sap-client property from the destination via
DefaultHttpDestination.fromDestination(<some-destination>).removeProperty("sap-client")
.We are aware that OnPremise systems need this property, so we are setting it manually for each request as query parameter and as header.
To our surprise, all requests to OnPremise systems faild with status 400.
We were startled by this behavior and did not expect it at all. As per this cloud sdk docu, the sap-client header is set automatically if it is present on the destination. Nothing else is mentioned here. But there must be another difference.
I have debugged into this to see what this different is - please see the screenshots:
Header of request with Cloud sdk sap-client header:
Header of request setting sap-client header manually:
Differences I noticed:
org.apache.http.message.BasicHeader
(set manually) andcom.sap.cloud.sdk.cloudplatform.connectivity.Header
(loud sdk default logic)Do you have any idea what else could be going wrong here? Does the cloud-sdk do any additional stuff, other than setting the header?
Impact / Priority
Changing this header logic led to massive issues on our customers side, we had to revert to code and are now analyzing the root issue. However, we dont understand the difference with these two apporaches.
Applicaiton Logs
There is very little application logging. All requests to OnPremise systems simply returned with status 400. No other meaningful massage. Sending requests to the system works with postman.
Maven Dependency tree
mvn-dependency-tree.txt
Project Details
com.sap.cloud.sdk sdk-bom : 5.11.0
Checklist