diff src/http/modules/ngx_http_gzip_filter_module.c @ 3773:a08e8b3832ae

gzip_disable degradation
author Igor Sysoev <igor@sysoev.ru>
date Mon, 04 Oct 2010 15:03:00 +0000
parents dd1570b6f237
children 5db098f97e0e 4919fb357a5d
line wrap: on
line diff
--- 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_req
 
     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);