Hello, My rest calls (using the c# rest API) have begun crashing because of a duplicate Vary header being returned from the test environment. For example, a call to GetCustomerPaymentInstrumentsList or GetCustomer results in an exception because of the following headers in the response:
HTTP/1.1 200
uniqueTransactionID: 48005e02-cd90-4c13-8631-e602fd8037fa
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Set-Cookie: JSESSIONID=xxxxxxA608xxxxDB6E4F9FE23FD490ED; Path=/; Secure; HttpOnly
The data in the response is correct, but those headers should be a single comma delimited value.
These Vary headers were not present in the same form a few days prior,
Was there a recent change to the test environment? (https://apitest.cybersource.com)
I suppose I can edit the client library to handle those additional Vary headers, but I think they may be incorrect.
Code fragment : PostCustomerRequest result = apiInstance.GetCustomer(customerTokenId);
Result: Exception: "An item with the same key has already been added. Key: Vary'"
08-13-2024 09:36 AM
The RetrieveCustomer Sample from cybersource-rest-samples-netcore also now fails with the same exception.
08-13-2024 12:45 PM
I've only just started working with the Cybersource APIs and hit this problem immediately. I'm calling PostCustomerRequest() in the C# sample project and getting the error in PostCustomerWithHttpInfo() in the Cybersource SDK. I'm getting those same three 'vary' headers.
08-20-2024 06:00 AM
We are also running into this in the sandbox environment. This currently breaks the C# REST SDK.
08-21-2024 09:13 AM
I am as well, got a note from support saying they have updated in sandbox to fix, but not seeing it fixed. I will update my case there that it continues to return multiple vary headers and the C# client is using a dictionary to capture them. . .
08-21-2024 06:36 PM
I see a fix pending in a branch on the client libraries.
08-23-2024 11:38 AM