]> git.kaiwu.me - nginx.git/commitdiff
test frequent r->header_only before three response status
authorIgor Sysoev <igor@sysoev.ru>
Thu, 12 Nov 2009 13:44:16 +0000 (13:44 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 12 Nov 2009 13:44:16 +0000 (13:44 +0000)
src/http/modules/ngx_http_gzip_filter_module.c

index 4c0c0d201f77ddc46911d1fa5ffd8d58a906f870..337700c0df2faca6bb41e2e9d0f5b290f01ccd46 100644 (file)
@@ -243,10 +243,10 @@ ngx_http_gzip_header_filter(ngx_http_request_t *r)
     conf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_filter_module);
 
     if (!conf->enable
+        || r->header_only
         || (r->headers_out.status != NGX_HTTP_OK
             && r->headers_out.status != NGX_HTTP_FORBIDDEN
             && r->headers_out.status != NGX_HTTP_NOT_FOUND)
-        || r->header_only
         || (r->headers_out.content_encoding
             && r->headers_out.content_encoding->value.len)
         || (r->headers_out.content_length_n != -1