Close popover
Rama Krishna Cherukuri (RamaKrishnaC7790)

RamaKrishnaC7790 Member since 2018 1 post
Posted: November 26, 2018
Last activity: December 7, 2018

Pega setting content-length value incorrectly in Connect-Rest in case of any special characters in the request data

In application, We are calling in Rest service using Connect-Rest. connect request some times may have the special characters lile "/", "\n",:, - . In the request We are setting "Content-type" to application/json and we are not setting any content-length header in the request.

When connector is invoked, It is failing with 401 bad request error, But when trace and take the JSON request data and request header data from the Pega and execute service with same json request data and Hader data from SOAP UI. It is working fine.

Service is only failing when service is invoked from Pega through connect-rest .

Below is the observation:

Though In connector request we do not set "Content-Length" header in Pega or SOAP UI , Content-Length header request is still sent.

When Pega call the service Content-length is set to 650 and when SOAP UI calls the service, it sets the Content-Length to 915.

There is a clear difference in the content length between pega request and SOAP UI request. Looks like pega is setting content-length incorrectly .

How to overcome this issue . Is ther any way to calculate the length of the final request and set the "Content-Length" correctly in pega

Data Integration
Moderation Team has archived post