Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_charset_filter_module.c @ 2890:a4302032b831
fix the previous commit
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 25 May 2009 19:57:25 +0000 |
parents | 0bb8c54f4c45 |
children | 76dfc19dcd49 |
comparison
equal
deleted
inserted
replaced
2889:0bb8c54f4c45 | 2890:a4302032b831 |
---|---|
286 | 286 |
287 r->headers_out.content_type.len = r->headers_out.content_type_len; | 287 r->headers_out.content_type.len = r->headers_out.content_type_len; |
288 | 288 |
289 ngx_http_set_charset(r, &dst); | 289 ngx_http_set_charset(r, &dst); |
290 | 290 |
291 if (source_charset == charset) { | 291 if (source_charset != charset) { |
292 return ngx_http_charset_ctx(r, charsets, charset, source_charset); | 292 return ngx_http_charset_ctx(r, charsets, charset, source_charset); |
293 } | 293 } |
294 | 294 |
295 return ngx_http_next_header_filter(r); | 295 return ngx_http_next_header_filter(r); |
296 | 296 |
408 | 408 |
409 charset = ngx_http_get_charset(r, main_charset); | 409 charset = ngx_http_get_charset(r, main_charset); |
410 | 410 |
411 ctx->charset = charset; | 411 ctx->charset = charset; |
412 ctx->charset_name = *main_charset; | 412 ctx->charset_name = *main_charset; |
413 *src = *main_charset; | |
413 | 414 |
414 return charset; | 415 return charset; |
415 } | 416 } |
416 | 417 |
417 | 418 |
516 | 517 |
517 ngx_http_set_ctx(r, ctx, ngx_http_charset_filter_module); | 518 ngx_http_set_ctx(r, ctx, ngx_http_charset_filter_module); |
518 | 519 |
519 ctx->table = charsets[source_charset].tables[charset]; | 520 ctx->table = charsets[source_charset].tables[charset]; |
520 ctx->charset = charset; | 521 ctx->charset = charset; |
522 ctx->charset_name = charsets[charset].name; | |
521 ctx->length = charsets[charset].length; | 523 ctx->length = charsets[charset].length; |
522 ctx->from_utf8 = charsets[source_charset].utf8; | 524 ctx->from_utf8 = charsets[source_charset].utf8; |
523 ctx->to_utf8 = charsets[charset].utf8; | 525 ctx->to_utf8 = charsets[charset].utf8; |
524 | 526 |
525 r->filter_need_in_memory = 1; | 527 r->filter_need_in_memory = 1; |