rack/rack — pull request #479 by jbaudanza (2013-01-02 01:11:01+00:00)
Title: Rack::File serves gzipped assets when available

@raggi, After poking around a bit, I think Rack::File is the cleanest place to put this change.

This is a very small addition to Rack::File. I think adding it to Rack::Static would be slightly more complex. For example, since Rack::File would set all compressed content-types to "application/gzip", we would need to duplicate the Rack::File mime type logic in Rack::Static to correct this.

I looked at the header_rule stuff in Rack::Static, but couldn't see any graceful way to reuse it.

LMK what you think.