Mercurial > hg > nginx
diff src/http/modules/ngx_http_charset_filter.c @ 307:ce375c313e96
nginx-0.0.3-2004-04-08-19:58:25 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 08 Apr 2004 15:58:25 +0000 |
parents | 4db54fdbcbe7 |
children | 0376cffa29e6 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_charset_filter.c +++ b/src/http/modules/ngx_http_charset_filter.c @@ -62,6 +62,12 @@ static int ngx_http_charset_header_filte { ngx_http_charset_loc_conf_t *lcf; + lcf = ngx_http_get_module_loc_conf(r, ngx_http_charset_filter_module); + + if (lcf->default_charset.len == 0) { + return ngx_http_next_header_filter(r); + } + if (r->headers_out.content_type == NULL || ngx_strncasecmp(r->headers_out.content_type->value.data, "text/", 5) != 0 @@ -72,8 +78,6 @@ static int ngx_http_charset_header_filte return ngx_http_next_header_filter(r); } - lcf = ngx_http_get_module_loc_conf(r, ngx_http_charset_filter_module); - if (r->headers_out.status == NGX_HTTP_MOVED_PERMANENTLY && r->headers_out.status == NGX_HTTP_MOVED_TEMPORARILY) { @@ -135,7 +139,7 @@ static char *ngx_http_charset_merge_loc_ ngx_http_charset_loc_conf_t *conf = child; ngx_conf_merge_str_value(conf->default_charset, - prev->default_charset, "koi8-r"); + prev->default_charset, ""); return NGX_CONF_OK; }