There is a server that sends responses to HTTP requests, and these responses have a Content-Length header, but the server is proxied through nginx, which is configured for gzip responses to be smaller, but also forces it to use chunked transfer encoding, which does not indicate Content- Length This means that the client does not know the size of the response when it is received, therefore, for example, the web browser cannot display a progress bar. Is there a way to configure nginx for a gzip response, but calculate and send the exact Content-Length header instead of using encoded encoding?
(This is basically the same as this other question , except nginx instead of Apache.)
Avril source
share