Need consideration on using Transport Layer Context Variables in some specific scenario.

Document ID : KB000072227
Last Modified Date : 27/02/2018
Show Technical Document Details
In the below sequences, customer wants to know the Content-Type of Response2.
Front(Request1) -> APIGW -> Backend
Front(Response2) <- APIGW <- Backend(Response1)
In the Traffic Log, ${response.http.headervalues.Content-Length} value is not expected.
A policy has following assertions in sequence:
1. Route via HTTP(S) assertion
2. Return Template Response to Requestor
-> this returns different value and length regardless of the previous response. Also, changes Content-Type.
Traffic Log is configured as File type. And the Cluster-Wide property is defined as following to output response Content-Length as well as all response headers:
-> trafficlogger.detail = |${response.http.headervalues.Content-Length}|, |${response.http.headervalues.Content-Type}|, |${response.http.allheadervalues}|, ${request.time}, ${request.soap.namespace}, ${request.soap.operationname}, ${response.http.status}
Under such circumstances, ${response.http.headervalues.Content-Length} value written is incorrect in the Traffic Log. The value represents the Content-Length which is returned by the previous Route via HTTP(S) assertion.
Customer wants to retrieve the Content-Length value of the Return Template Response to Requestor assertion.
CA API Gateway 9.2
Basically, “Return Template Response to Requestor” assertion is designed to not interfere with the policy preceding it. However, in the customer scenario, Content-Length and Content-Type are overwritten by the assertion after executing a “Route via HTTP(S)” assertion. Hence, these corresponding Transport Layer Context Variables may not be applicable. (Other Transport Layer Context Variables are still applicable.)
As a workaround, the below Message Layer Context Variable can be used in this case.
- ${} if they want only the size of the main content
- ${}
Additional Information: