Mercurial > hg > nginx-vendor-current
comparison src/http/modules/ngx_http_charset_filter_module.c @ 74:77969b24f355 NGINX_0_1_37
nginx 0.1.37
*) Change: now the "\n" is added to the end of the "nginx.pid" file.
*) Bugfix: the responses may be transferred not completely, if many
parts or the big parts were included by SSI.
*) Bugfix: if all backends had returned the 404 reponse and the
"http_404" parameter of the "proxy_next_upstream" or
"fastcgi_next_upstream" directives was used, then nginx started to
request all backends again.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 23 Jun 2005 00:00:00 +0400 |
parents | b31656313b59 |
children | 9db7e0b5b27f |
comparison
equal
deleted
inserted
replaced
73:05310cdbd906 | 74:77969b24f355 |
---|---|
32 } ngx_http_charset_main_conf_t; | 32 } ngx_http_charset_main_conf_t; |
33 | 33 |
34 | 34 |
35 typedef struct { | 35 typedef struct { |
36 ngx_flag_t enable; | 36 ngx_flag_t enable; |
37 ngx_flag_t autodetect; | |
38 | 37 |
39 ngx_int_t default_charset; | 38 ngx_int_t default_charset; |
40 ngx_int_t source_charset; | 39 ngx_int_t source_charset; |
41 } ngx_http_charset_loc_conf_t; | 40 } ngx_http_charset_loc_conf_t; |
42 | 41 |
92 { ngx_string("charset"), | 91 { ngx_string("charset"), |
93 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | 92 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, |
94 ngx_conf_set_flag_slot, | 93 ngx_conf_set_flag_slot, |
95 NGX_HTTP_LOC_CONF_OFFSET, | 94 NGX_HTTP_LOC_CONF_OFFSET, |
96 offsetof(ngx_http_charset_loc_conf_t, enable), | 95 offsetof(ngx_http_charset_loc_conf_t, enable), |
97 NULL }, | |
98 | |
99 { ngx_string("autodetect_charset"), | |
100 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | |
101 ngx_conf_set_flag_slot, | |
102 NGX_HTTP_LOC_CONF_OFFSET, | |
103 offsetof(ngx_http_charset_loc_conf_t, autodetect), | |
104 NULL }, | 96 NULL }, |
105 | 97 |
106 ngx_null_command | 98 ngx_null_command |
107 }; | 99 }; |
108 | 100 |
568 if (lcf == NULL) { | 560 if (lcf == NULL) { |
569 return NGX_CONF_ERROR; | 561 return NGX_CONF_ERROR; |
570 } | 562 } |
571 | 563 |
572 lcf->enable = NGX_CONF_UNSET; | 564 lcf->enable = NGX_CONF_UNSET; |
573 lcf->autodetect = NGX_CONF_UNSET; | |
574 lcf->default_charset = NGX_CONF_UNSET; | 565 lcf->default_charset = NGX_CONF_UNSET; |
575 lcf->source_charset = NGX_CONF_UNSET; | 566 lcf->source_charset = NGX_CONF_UNSET; |
576 | 567 |
577 return lcf; | 568 return lcf; |
578 } | 569 } |
583 { | 574 { |
584 ngx_http_charset_loc_conf_t *prev = parent; | 575 ngx_http_charset_loc_conf_t *prev = parent; |
585 ngx_http_charset_loc_conf_t *conf = child; | 576 ngx_http_charset_loc_conf_t *conf = child; |
586 | 577 |
587 ngx_conf_merge_value(conf->enable, prev->enable, 0); | 578 ngx_conf_merge_value(conf->enable, prev->enable, 0); |
588 ngx_conf_merge_value(conf->autodetect, prev->autodetect, 0); | |
589 | |
590 | 579 |
591 if (conf->default_charset == NGX_CONF_UNSET) { | 580 if (conf->default_charset == NGX_CONF_UNSET) { |
592 conf->default_charset = prev->default_charset; | 581 conf->default_charset = prev->default_charset; |
593 } | 582 } |
594 | 583 |