Mercurial > hg > nginx
diff src/http/ngx_http_core_module.c @ 463:1f31dc6d33a3 release-0.1.6
nginx-0.1.6-RELEASE import
*) Bugfix: some location directive combinations with the regular
expressions caused the wrong configuration choose.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 11 Nov 2004 20:58:09 +0000 |
parents | a88a3e4e158f |
children | bbd6b0b4a2b1 |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Thu Nov 11 14:07:14 2004 +0000 +++ b/src/http/ngx_http_core_module.c Thu Nov 11 20:58:09 2004 +0000 @@ -992,6 +992,11 @@ return 1; } + if (!first->regex && second->regex) { + /* shift the regex matches to the end */ + return -1; + } + if (first->regex || second->regex) { /* do not sort the regex matches */ return 0; @@ -1061,8 +1066,7 @@ if (cf->args->nelts == 3) { if (value[1].len == 1 && value[1].data[0] == '=') { - clcf->name.len = value[2].len; - clcf->name.data = value[2].data; + clcf->name = value[2]; clcf->exact_match = 1; } else if ((value[1].len == 1 && value[1].data[0] == '~') @@ -1098,8 +1102,7 @@ } } else { - clcf->name.len = value[1].len; - clcf->name.data = value[1].data; + clcf->name = value[1]; } pclcf = pctx->loc_conf[ngx_http_core_module.ctx_index];