Mercurial > hg > nginx
changeset 3379:0c517d0cabe0
backout r3315 and test r->header_only last, since it's not actually
frequent here: 304 and HEAD responses are not set it before the filter
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 07 Dec 2009 15:41:57 +0000 |
parents | 5d17022a1e88 |
children | 1d9063f7483c |
files | src/http/modules/ngx_http_gzip_filter_module.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_gzip_filter_module.c Mon Dec 07 15:32:38 2009 +0000 +++ b/src/http/modules/ngx_http_gzip_filter_module.c Mon Dec 07 15:41:57 2009 +0000 @@ -243,7 +243,6 @@ 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) @@ -251,7 +250,8 @@ && r->headers_out.content_encoding->value.len) || (r->headers_out.content_length_n != -1 && r->headers_out.content_length_n < conf->min_length) - || ngx_http_test_content_type(r, &conf->types) == NULL) + || ngx_http_test_content_type(r, &conf->types) == NULL + || r->header_only) { return ngx_http_next_header_filter(r); }