Mercurial > hg > nginx
comparison src/http/modules/ngx_http_sub_filter_module.c @ 2135:8c6521eedf84
ngx_strlow()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 04 Aug 2008 10:07:00 +0000 |
parents | 333ef9e18a59 |
children | 723df5089c05 |
comparison
equal
deleted
inserted
replaced
2134:13652cba8633 | 2135:8c6521eedf84 |
---|---|
630 { | 630 { |
631 ngx_http_sub_loc_conf_t *slcf = conf; | 631 ngx_http_sub_loc_conf_t *slcf = conf; |
632 | 632 |
633 ngx_str_t *value; | 633 ngx_str_t *value; |
634 ngx_int_t n; | 634 ngx_int_t n; |
635 ngx_uint_t i; | |
636 ngx_http_script_compile_t sc; | 635 ngx_http_script_compile_t sc; |
637 | 636 |
638 if (slcf->match.len) { | 637 if (slcf->match.len) { |
639 return "is duplicate"; | 638 return "is duplicate"; |
640 } | 639 } |
641 | 640 |
642 value = cf->args->elts; | 641 value = cf->args->elts; |
643 | 642 |
643 ngx_strlow(value[1].data, value[1].data, value[1].len); | |
644 | |
644 slcf->match = value[1]; | 645 slcf->match = value[1]; |
645 | |
646 for (i = 0; i < value[1].len; i++) { | |
647 value[1].data[i] = ngx_tolower(value[1].data[i]); | |
648 } | |
649 | 646 |
650 n = ngx_http_script_variables_count(&value[2]); | 647 n = ngx_http_script_variables_count(&value[2]); |
651 | 648 |
652 if (n == 0) { | 649 if (n == 0) { |
653 slcf->sub = value[2]; | 650 slcf->sub = value[2]; |