Mercurial > hg > nginx-ranges
comparison src/http/modules/ngx_http_gzip_filter_module.c @ 126:df17fbafec8f NGINX_0_3_10
nginx 0.3.10
*) Change: the "valid_referers" directive and the "$invalid_referer"
variable were moved to the new ngx_http_referer_module from the
ngx_http_rewrite_module.
*) Change: the "$apache_bytes_sent" variable name was changed to
"$body_bytes_sent".
*) Feature: the "$sent_http_..." variables.
*) Feature: the "if" directive supports the "=" and "!=" operations.
*) Feature: the "proxy_pass" directive supports the HTTPS protocol.
*) Feature: the "proxy_set_body" directive.
*) Feature: the "post_action" directive.
*) Feature: the ngx_http_empty_gif_module.
*) Feature: the "worker_cpu_affinity" directive for Linux.
*) Bugfix: the "rewrite" directive did not unescape URI part in
redirect, now it is unescaped except the %00-%25 and %7F-%FF
characters.
*) Bugfix: nginx could not be built by the icc 9.0 compiler.
*) Bugfix: if the SSI was enabled for zero size static file, then the
chunked response was encoded incorrectly.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 15 Nov 2005 00:00:00 +0300 |
parents | d25a1d6034f1 |
children | 91372f004adf |
comparison
equal
deleted
inserted
replaced
125:97504de1f89e | 126:df17fbafec8f |
---|---|
299 | 299 |
300 | 300 |
301 type = conf->types->elts; | 301 type = conf->types->elts; |
302 for (i = 0; i < conf->types->nelts; i++) { | 302 for (i = 0; i < conf->types->nelts; i++) { |
303 if (r->headers_out.content_type.len >= type[i].len | 303 if (r->headers_out.content_type.len >= type[i].len |
304 && ngx_strncasecmp(r->headers_out.content_type.data, | 304 && ngx_strncasecmp(r->headers_out.content_type.data, |
305 type[i].data, type[i].len) == 0) | 305 type[i].data, type[i].len) == 0) |
306 { | 306 { |
307 goto found; | 307 goto found; |
308 } | 308 } |
309 } | 309 } |
356 r->headers_out.content_encoding->key.data = (u_char *) "Content-Encoding"; | 356 r->headers_out.content_encoding->key.data = (u_char *) "Content-Encoding"; |
357 r->headers_out.content_encoding->value.len = sizeof("gzip") - 1; | 357 r->headers_out.content_encoding->value.len = sizeof("gzip") - 1; |
358 r->headers_out.content_encoding->value.data = (u_char *) "gzip"; | 358 r->headers_out.content_encoding->value.data = (u_char *) "gzip"; |
359 | 359 |
360 ctx->length = r->headers_out.content_length_n; | 360 ctx->length = r->headers_out.content_length_n; |
361 r->headers_out.content_length_n = -1; | |
362 | |
363 if (r->headers_out.content_length) { | |
364 r->headers_out.content_length->hash = 0; | |
365 r->headers_out.content_length = NULL; | |
366 } | |
367 | 361 |
368 r->main_filter_need_in_memory = 1; | 362 r->main_filter_need_in_memory = 1; |
363 | |
364 ngx_http_clear_content_length(r); | |
365 ngx_http_clear_accept_ranges(r); | |
369 | 366 |
370 return ngx_http_next_header_filter(r); | 367 return ngx_http_next_header_filter(r); |
371 } | 368 } |
372 | 369 |
373 | 370 |
991 ngx_http_variable_value_t *v, uintptr_t data) | 988 ngx_http_variable_value_t *v, uintptr_t data) |
992 { | 989 { |
993 ngx_uint_t zint, zfrac; | 990 ngx_uint_t zint, zfrac; |
994 ngx_http_gzip_ctx_t *ctx; | 991 ngx_http_gzip_ctx_t *ctx; |
995 | 992 |
996 v->valid = 1; | 993 v->valid = 1; |
997 v->no_cachable = 0; | 994 v->no_cachable = 0; |
998 v->not_found = 0; | 995 v->not_found = 0; |
999 | 996 |
1000 ctx = ngx_http_get_module_ctx(r, ngx_http_gzip_filter_module); | 997 ctx = ngx_http_get_module_ctx(r, ngx_http_gzip_filter_module); |
1001 | 998 |
1094 | 1091 |
1095 ngx_conf_merge_value(conf->level, prev->level, 1); | 1092 ngx_conf_merge_value(conf->level, prev->level, 1); |
1096 ngx_conf_merge_size_value(conf->wbits, prev->wbits, MAX_WBITS); | 1093 ngx_conf_merge_size_value(conf->wbits, prev->wbits, MAX_WBITS); |
1097 ngx_conf_merge_size_value(conf->memlevel, prev->memlevel, | 1094 ngx_conf_merge_size_value(conf->memlevel, prev->memlevel, |
1098 MAX_MEM_LEVEL - 1); | 1095 MAX_MEM_LEVEL - 1); |
1099 ngx_conf_merge_value(conf->min_length, prev->min_length, 0); | 1096 ngx_conf_merge_value(conf->min_length, prev->min_length, 20); |
1100 ngx_conf_merge_value(conf->no_buffer, prev->no_buffer, 0); | 1097 ngx_conf_merge_value(conf->no_buffer, prev->no_buffer, 0); |
1101 | 1098 |
1102 if (conf->types == NULL) { | 1099 if (conf->types == NULL) { |
1103 if (prev->types == NULL) { | 1100 if (prev->types == NULL) { |
1104 conf->types = ngx_array_create(cf->pool, 1, sizeof(ngx_str_t)); | 1101 conf->types = ngx_array_create(cf->pool, 1, sizeof(ngx_str_t)); |