Mercurial > hg > nginx-vendor-current
comparison src/http/modules/ngx_http_gzip_filter_module.c @ 546:e19e5f542878 NGINX_0_8_25
nginx 0.8.25
*) Change: now no message is written in an error log if a variable is
not found by $r->variable() method.
*) Feature: the ngx_http_degradation_module.
*) Feature: regular expression named captures.
*) Feature: now URI part is not required a "proxy_pass" directive if
variables are used.
*) Feature: now the "msie_padding" directive works for Chrome too.
*) Bugfix: a segmentation fault occurred in a worker process on low
memory condition; the bug had appeared in 0.8.18.
*) Bugfix: nginx sent gzipped responses to clients those do not support
gzip, if "gzip_static on" and "gzip_vary off"; the bug had appeared
in 0.8.16.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 16 Nov 2009 00:00:00 +0300 |
parents | f39b9e29530d |
children | 5c576ea5dbd9 |
comparison
equal
deleted
inserted
replaced
545:91e4b06e1a01 | 546:e19e5f542878 |
---|---|
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) |
255 || ngx_http_gzip_ok(r) != NGX_OK) | |
256 { | 255 { |
256 return ngx_http_next_header_filter(r); | |
257 } | |
258 | |
259 r->gzip_vary = 1; | |
260 | |
261 if (!r->gzip_tested) { | |
262 if (ngx_http_gzip_ok(r) != NGX_OK) { | |
263 return ngx_http_next_header_filter(r); | |
264 } | |
265 | |
266 } else if (!r->gzip_ok) { | |
257 return ngx_http_next_header_filter(r); | 267 return ngx_http_next_header_filter(r); |
258 } | 268 } |
259 | 269 |
260 ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_gzip_ctx_t)); | 270 ctx = ngx_pcalloc(r->pool, sizeof(ngx_http_gzip_ctx_t)); |
261 if (ctx == NULL) { | 271 if (ctx == NULL) { |