"Return Template Response To Requester" assertion returns the response header/value "Connection: close" when the HTTP Status Code is 400 and 500.
Customer tested other HTTP Status Codes and observed the following result.
HTTP Status Code=400 -> the header existed
HTTP Status Code=404 -> the header NOT existed
HTTP Status Code=429 -> the header NOT existed
HTTP Status Code=504 -> the header NOT existed
HTTP Status Code=500 -> the header existed
Release :
Component : API GATEWAY
These HTTP Status Codes are defined as following.
https://tools.ietf.org/html/rfc2616#section-10
10.4.1 400 Bad Request
10.4.5 404 Not Found
10.5.1 500 Internal Server Error
10.5.5 504 Gateway Timeout
https://tools.ietf.org/html/rfc6585
4. 429 Too Many Requests
As for the customer result, except 400 and 500, API Gateway considers the Status Code may not affect its function and it may continue receiving requests with using the same connection. Hence, the header "Connection: close" was not issued for them.
If customer expects the header “Connection: close”for all those responses, customer may explicitly add the header and value in their own policy.