rack-zippy
rack-zippy copied to clipboard
Set X-Content-Length?
In the case where there exists both a foo and a foo.gz, can this be enhanced to set the X-Content-Length header to the size of foo when sending foo.gz?
Hi @iainbryson - sorry for the slow response and thanks for the question. I didn't find much information about X-Content-Length.
It'd be possible for rack-zippy or actionpack or rack to handle adding the header. Quite where the better location for inserting the X-Content-Length header is isn't clear to me without more information.
Currently Rack::File
handles setting the Content-Length
header, and actionpack's Static
middleware handles deciding if to serve the .gz
file or not.