Mercurial > hg > nginx
comparison src/http/modules/ngx_http_gzip_filter_module.c @ 3314:d17c4c5c1c57
test frequent r->header_only before three response status
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 12 Nov 2009 13:44:16 +0000 |
parents | 118169a8ec92 |
children | 6b8e5c882e47 |
comparison
equal
deleted
inserted
replaced
3313:118169a8ec92 | 3314:d17c4c5c1c57 |
---|---|
241 ngx_http_gzip_conf_t *conf; | 241 ngx_http_gzip_conf_t *conf; |
242 | 242 |
243 conf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_filter_module); | 243 conf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_filter_module); |
244 | 244 |
245 if (!conf->enable | 245 if (!conf->enable |
246 || r->header_only | |
246 || (r->headers_out.status != NGX_HTTP_OK | 247 || (r->headers_out.status != NGX_HTTP_OK |
247 && r->headers_out.status != NGX_HTTP_FORBIDDEN | 248 && r->headers_out.status != NGX_HTTP_FORBIDDEN |
248 && r->headers_out.status != NGX_HTTP_NOT_FOUND) | 249 && r->headers_out.status != NGX_HTTP_NOT_FOUND) |
249 || r->header_only | |
250 || (r->headers_out.content_encoding | 250 || (r->headers_out.content_encoding |
251 && r->headers_out.content_encoding->value.len) | 251 && r->headers_out.content_encoding->value.len) |
252 || (r->headers_out.content_length_n != -1 | 252 || (r->headers_out.content_length_n != -1 |
253 && r->headers_out.content_length_n < conf->min_length) | 253 && r->headers_out.content_length_n < conf->min_length) |
254 || ngx_http_test_content_type(r, &conf->types) == NULL) | 254 || ngx_http_test_content_type(r, &conf->types) == NULL) |