Automic REST jobs are not sending Cookies correctly to SAP

Document ID : KB000120016
Last Modified Date : 06/11/2018
Show Technical Document Details
Issue:
When attempting to integrate Automic and SAP via RA Webservice REST jobs, the cookies are not being sent correctly through HTTP Request headers and the job ends with status code 302. The cookie information being received and sent through Automic are the same values, but the job fails when sending the cookie information to SAP. 
Cause:
The set-cookie header is in two lines, which Automic separates by a comma based on rfc7230 (https://tools.ietf.org/html/rfc7230).

The set-cookie information is being used as HTTP headers, but the intent on the SAP side is to use this as cookie information. SAP expects the cookie headers to be separated by a semicolon instead which throws the error. 
Resolution:
Use scripting functions (STR_FIND/STR_REPLACE) to rebuild the value so it uses a semicolon instead of a comma before it is passed to SAP.