From 5fffff997f30e5c56dd95309bb3615f798f8c7c6 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 4 Oct 2010 15:03:00 +0000 Subject: gzip_disable degradation --- src/http/modules/ngx_http_gzip_filter_module.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/http/modules') 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); -- cgit