I see that the Content-Length header is read when a response passes through the middleware, and that it is later deleted before writing the gzipped response to prevent the EOF.
Should a Content-Length header be set after the size of the compressed content is known? What are the reasons for omitting Content-Length on gzipped responses?
I see that the
Content-Length
header is read when a response passes through the middleware, and that it is later deleted before writing the gzipped response to prevent the EOF.Should a
Content-Length
header be set after the size of the compressed content is known? What are the reasons for omittingContent-Length
on gzipped responses?