Skip to content

alonbg/ngx_http_gunzip_filter_module

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gunzip module for nginx.

This module allows gunzipping responses returned with Content-Encoding: gzip
for clients that doesn't support it.  It may be usefull if you prefer to store
data compressed (to save space or disk/network IO) but do not want to penalize
clients without gzip support.

Note well: only responses with Content-Encoding set to gzip before this module
are handled (e.g. using "add_header Content-Encoding gzip;" isn't enough as it
happens after).  As of now only proxy and fastcgi are able to do so.

This module was designed to work with nginx 0.8.* (though it should work with
0.7.* too).

Configuration directives:

    gunzip (on|always|off)

        Context: http, server, location
        Default: off

        off
          Disable gunzip
        on
          Enable gunzip for clients that doesn't support it.
        always
          Enable gunzip even if clients support it.
          But only for files of mime types specified by gunzip_types.

    gunzip_types mime-type ...;
        Context: http, server, location, if in location
        Default: gunzip_types text/html;

    gunzip_buffers <number> <size>

        Context: http, server, location
        Default: 32 4k/16 8k

        Specifies number and size of buffers available for decompression.


Usage:

    location /storage/ {
        gunzip on;
        ...
    }


To compile nginx with gunzip module, use "--add-module <path>" option to nginx
configure.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 61.1%
  • Perl 38.9%