diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2004-04-08 15:58:25 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2004-04-08 15:58:25 +0000 |
| commit | fff32326ca9009ebba0aadd24aa0683afe0d4a02 (patch) | |
| tree | ac738d570dd46b0ef6b15b09b42d9956245f5005 /src/http/modules | |
| parent | 9a864bd8f87efd0fa23f552d4277475dd76bcea4 (diff) | |
| download | nginx-fff32326ca9009ebba0aadd24aa0683afe0d4a02.tar.gz nginx-fff32326ca9009ebba0aadd24aa0683afe0d4a02.tar.bz2 | |
nginx-0.0.3-2004-04-08-19:58:25 import
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_charset_filter.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_charset_filter.c b/src/http/modules/ngx_http_charset_filter.c index a545eafa1..052a1f822 100644 --- 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_filter(ngx_http_request_t *r) { 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_filter(ngx_http_request_t *r) 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_conf(ngx_conf_t *cf, 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; } |
