diff src/http/modules/ngx_http_charset_filter_module.c @ 396:349057ecf4d5 NGINX_0_7_10

nginx 0.7.10 *) Bugfix: in the "addition_types", "charset_types", "gzip_types", "ssi_types", "sub_filter_types", and "xslt_types" directives; the bugs had appeared in 0.7.9. *) Bugfix: of recursive error_page for 500 status code. *) Bugfix: now the ngx_http_realip_module set address not for whole keepalive connection, but for each request passed via the connection.
author Igor Sysoev <http://sysoev.ru>
date Wed, 13 Aug 2008 00:00:00 +0400
parents 05981f639d21
children 9d81578d04bb
line wrap: on
line diff
--- 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
     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
     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;
 }