summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-08-13 16:25:48 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-08-13 16:25:48 +0000
commitc71e3d8f8182b3034f4d7527bdc1748730c5863f (patch)
tree28137cf40749b6e9999f64f288728a8e2a95f78e /src/http/modules
parentd1853490daa04fc8ada502ab8649af477ca63c2f (diff)
downloadnginx-c71e3d8f8182b3034f4d7527bdc1748730c5863f.tar.gz
nginx-c71e3d8f8182b3034f4d7527bdc1748730c5863f.tar.bz2
*) fix segfaults in types hash
*) fix inheritance: default hash instead of inherited one
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_charset_filter_module.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/http/modules/ngx_http_charset_filter_module.c b/src/http/modules/ngx_http_charset_filter_module.c
index 459143a46..893805554 100644
--- a/src/http/modules/ngx_http_charset_filter_module.c
+++ b/src/http/modules/ngx_http_charset_filter_module.c
@@ -1484,6 +1484,14 @@ ngx_http_charset_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_http_charset_recode_t *recode;
ngx_http_charset_main_conf_t *mcf;
+ if (ngx_http_merge_types(cf, conf->types_keys, &conf->types,
+ prev->types_keys, &prev->types,
+ ngx_http_charset_default_types)
+ != NGX_OK)
+ {
+ return NGX_CONF_ERROR;
+ }
+
ngx_conf_merge_value(conf->override_charset, prev->override_charset, 0);
ngx_conf_merge_value(conf->charset, prev->charset, NGX_HTTP_NO_CHARSET);
@@ -1523,14 +1531,6 @@ ngx_http_charset_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
recode->src = conf->source_charset;
recode->dst = conf->charset;
- if (ngx_http_merge_types(cf, conf->types_keys, &conf->types,
- prev->types_keys, &prev->types,
- ngx_http_charset_default_types)
- != NGX_OK)
- {
- return NGX_CONF_ERROR;
- }
-
return NGX_CONF_OK;
}