nytimes/gziphandler

Should Content-Length be set on gzipped responses?

tonyghita opened this issue · 1 comments

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 have the same question.