# HG changeset patch # User Igor Sysoev # Date 1243281445 0 # Node ID a4302032b8313798ca219b94ffd08484c9bd850d # Parent 0bb8c54f4c4500d97d28d9a7f3b3bdd4491d6072 fix the previous commit diff --git a/src/http/modules/ngx_http_charset_filter_module.c b/src/http/modules/ngx_http_charset_filter_module.c --- a/src/http/modules/ngx_http_charset_filter_module.c +++ b/src/http/modules/ngx_http_charset_filter_module.c @@ -288,7 +288,7 @@ ngx_http_charset_header_filter(ngx_http_ ngx_http_set_charset(r, &dst); - if (source_charset == charset) { + if (source_charset != charset) { return ngx_http_charset_ctx(r, charsets, charset, source_charset); } @@ -410,6 +410,7 @@ ngx_http_main_request_charset(ngx_http_r ctx->charset = charset; ctx->charset_name = *main_charset; + *src = *main_charset; return charset; } @@ -518,6 +519,7 @@ ngx_http_charset_ctx(ngx_http_request_t ctx->table = charsets[source_charset].tables[charset]; ctx->charset = charset; + ctx->charset_name = charsets[charset].name; ctx->length = charsets[charset].length; ctx->from_utf8 = charsets[source_charset].utf8; ctx->to_utf8 = charsets[charset].utf8;