When a backend service responds with an HTTP 204 No Content status, the Layer7 API Gateway (version 11.1) incorrectly includes a Content-Type: application/json header in the response to the client.
This behavior may cause errors for clients that strictly follow RFC guidelines and do not expect a Content-Type header when there is no response body.
The issue is related to how the underlying Tomcat engine and Gateway core flow handle the 204 status. While Tomcat generally strips Content-Type for 204 responses, it does not automatically do so for 204 responses if a value is provided by the policy or backend. This behavior was changed in later versions to be more restrictive by default.
This issue is officially resolved in API Gateway version 11.2.2.
A new Cluster-Wide Property (CWP) has been introduced to allow administrators to explicitly strip these headers from 204 responses.
io.httpStripContentTypeOn204truefalse (The property is disabled by default to maintain backward compatibility).Once set to true, the Gateway will automatically omit both Content-Type and Content-Length headers from all 204 No Content responses, regardless of the backend service configuration or routing policy.