Mercurial > hg > nginx-vendor-current
diff src/http/ngx_http_core_module.c @ 12:7da8ea7c4448 NGINX_0_1_6
nginx 0.1.6
*) Bugfix: some location directive combinations with the regular
expressions caused the wrong configuration choose.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 11 Nov 2004 00:00:00 +0300 |
parents | 46833bd150cb |
children | 74b1868dd3cd |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -992,6 +992,11 @@ static int ngx_cmp_locations(const void 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 @@ static char *ngx_location_block(ngx_conf 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 @@ static char *ngx_location_block(ngx_conf } } 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];