Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set X-Content-Length? #48

Open
iainbryson opened this issue Nov 7, 2015 · 1 comment
Open

Set X-Content-Length? #48

iainbryson opened this issue Nov 7, 2015 · 1 comment

Comments

@iainbryson
Copy link

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?

@eliotsykes
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants