WebAppClientResponse Causing Parsing issue with POST requests with JSON body
search cancel

WebAppClientResponse Causing Parsing issue with POST requests with JSON body

book

Article ID: 280804

calendar_today

Updated On: 03-18-2024

Products

CA Single Sign On Agents (SiteMinder)

Issue/Introduction

- WebAppClientResponse Causing Parsing issue with POST requests with JSON body.
- Web Agent is not reading all the request including JSON Body.

Example of issue:

1) set the WebAppClientResponse  to something like the below 

Resource=/json/test123 *|Method=GET,POST|Status=401|Body=/autherror.txt|Content-Type=text/*|Charset=us-ascii|ResponseFormat=Application/json

and used the same autherror.txt as

{

"code": "UNAUTHORIZED",

"message": "LOGIN"

}

2)  Submit a  POST Request with the following headers and contents 

POST http://fedapp.example.com/json/test123

Error: Parse Error: Expected HTTP/

Request Headers

Accept: */*

Host: fedapp.example.com

Content-Type: application/json

User-Agent: PostmanRuntime/7.36.3

Cache-Control: no-cache

Postman-Token: 00308910-71ac-49d4-bcaf-94c6da59fd4a

Accept-Encoding: gzip, deflate, br

Connection: keep-alive

Request Body

{

"testbody": 22

}

You can see in the Apache Access logs the following 2 Entries 

10.******** - - [28/Feb/2024:18:18:42 +0000] "POST /json/test123 HTTP/1.1" 401 50 415
10.******** - - [28/Feb/2024:18:18:42 +0000] "{ " 500 528 6

The POST request is received and processed successfully by the agent since we can see from the trace that it is processing the request and setting 401 status as indicated in the WebAppClientResponse  and returning the message in the file 

However , due to the JSON body was not parsed properly , we see the second request as seen in the apache access log above which is resulting in 400 or 500

 

Environment

any 12.52 SP1 Agent 

Resolution

This is a Bug in the code and a Fix was provided to address the issue.

Please open a case and reach out to support to get the related patch.