Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a folder full of .gz files and would like to serve them transparently inflated if requested by a client that does not send Accept-Encoding: gzip in the request and as-is (gzip'd) otherwise.

I know there is the HttpGzipStaticModule module, but that only solves one part of the problem. The files will only be stored as .gz, so there won't be an inflated version there for nginx on the file system. This shouldn't be a performance issue, since inflate is fairly light on CPU and RAM.

What method can I use to inflate the .gz file on-the-fly and serve it back to the client? Do I have to script it and use a rewrite or is there something builtin that I just haven't found as of yet?

share|improve this question
    
You store the gunzipped files as well, or you write your own "GunzipStatic" module. –  Michael Hampton Mar 20 '13 at 19:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.