aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-12-07 15:41:57 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-12-07 15:41:57 +0000
commit58b1f9e9e4eb4be7c46ecfaf4a1592ec93a2d4b6 (patch)
treee3fc6310df6104168c81052f7668706dd328c5df
parent8f7c8f3c07038ce40e28cde141f936a8fd92eea9 (diff)
downloadnginx-58b1f9e9e4eb4be7c46ecfaf4a1592ec93a2d4b6.tar.gz
nginx-58b1f9e9e4eb4be7c46ecfaf4a1592ec93a2d4b6.zip
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
-rw-r--r--src/http/modules/ngx_http_gzip_filter_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c
index 19835b669..879971ffb 100644
--- a/src/http/modules/ngx_http_gzip_filter_module.c
+++ b/src/http/modules/ngx_http_gzip_filter_module.c
@@ -243,7 +243,6 @@ 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)
@@ -251,7 +250,8 @@ ngx_http_gzip_header_filter(ngx_http_request_t *r)
&& 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);
}