Mercurial > hg > nginx
comparison src/http/modules/ngx_http_charset_filter.c @ 396:6f3b20c1ac50
nginx-0.0.7-2004-07-18-23:11:20 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 18 Jul 2004 19:11:20 +0000 |
parents | 537de4dca8ca |
children | da8c5707af39 |
comparison
equal
deleted
inserted
replaced
395:f8f0f1834266 | 396:6f3b20c1ac50 |
---|---|
361 char *p = conf; | 361 char *p = conf; |
362 | 362 |
363 ngx_int_t *cp; | 363 ngx_int_t *cp; |
364 ngx_str_t *value; | 364 ngx_str_t *value; |
365 ngx_http_charset_t *charset; | 365 ngx_http_charset_t *charset; |
366 ngx_http_conf_ctx_t *ctx; | |
367 ngx_http_charset_main_conf_t *mcf; | 366 ngx_http_charset_main_conf_t *mcf; |
368 | 367 |
369 cp = (ngx_int_t *) (p + cmd->offset); | 368 cp = (ngx_int_t *) (p + cmd->offset); |
370 | 369 |
371 if (*cp != NGX_CONF_UNSET) { | 370 if (*cp != NGX_CONF_UNSET) { |
372 return "is duplicate"; | 371 return "is duplicate"; |
373 } | 372 } |
374 | 373 |
375 ctx = cf->ctx; | 374 mcf = ngx_http_conf_get_module_main_conf(cf, |
376 mcf = ctx->main_conf[ngx_http_charset_filter_module.ctx_index]; | 375 ngx_http_charset_filter_module); |
376 | |
377 value = cf->args->elts; | 377 value = cf->args->elts; |
378 | 378 |
379 *cp = ngx_http_add_charset(&mcf->charsets, &value[1]); | 379 *cp = ngx_http_add_charset(&mcf->charsets, &value[1]); |
380 if (*cp == NGX_ERROR) { | 380 if (*cp == NGX_ERROR) { |
381 return NGX_CONF_ERROR; | 381 return NGX_CONF_ERROR; |