We are trying to return gzip content with the Content-Length header set correctly. Setting Accept-Encoding: gzip on the request is handled correctly on the target endpoint and we do get back a response with Content-Type: gzip. When tracing we can see the response unzipped as apigee automatically unzips it and the Transfer-Encoding is correctly set to gzip.
However the post client flow is setting the Transfer-Encoding header to chunked and removing the Content-Length. How can we prevent this behaviour i.e. simply return Content-Encoding: gzip and maintaining the Content-Length header?
We have unsuccessfully tried using an Assign Message policy to remove the Transfer-Encoding header or setting it to gzip on response post flow.