diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2010-10-04 15:03:00 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2010-10-04 15:03:00 +0000 |
| commit | 5fffff997f30e5c56dd95309bb3615f798f8c7c6 (patch) | |
| tree | f20db6c16487b4182b49521ce0a8014dec395674 /src/http/modules | |
| parent | 81aa52829ae021dc226b4d25330c63c2ff31149a (diff) | |
| download | nginx-5fffff997f30e5c56dd95309bb3615f798f8c7c6.tar.gz nginx-5fffff997f30e5c56dd95309bb3615f798f8c7c6.tar.bz2 | |
gzip_disable degradation
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_gzip_filter_module.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c index e2b204ba2..d624e36ff 100644 --- a/src/http/modules/ngx_http_gzip_filter_module.c +++ b/src/http/modules/ngx_http_gzip_filter_module.c @@ -258,6 +258,18 @@ ngx_http_gzip_header_filter(ngx_http_request_t *r) r->gzip_vary = 1; +#if (NGX_HTTP_DEGRADATION) + { + ngx_http_core_loc_conf_t *clcf; + + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + + if (clcf->gzip_disable_degradation && ngx_http_degraded(r)) { + return ngx_http_next_header_filter(r); + } + } +#endif + if (!r->gzip_tested) { if (ngx_http_gzip_ok(r) != NGX_OK) { return ngx_http_next_header_filter(r); |
