Mercurial > hg > nginx-vendor-current
comparison 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 |
comparison
equal
deleted
inserted
replaced
11:74f668c50bce | 12:7da8ea7c4448 |
---|---|
990 if (first->regex && !second->regex) { | 990 if (first->regex && !second->regex) { |
991 /* shift the regex matches to the end */ | 991 /* shift the regex matches to the end */ |
992 return 1; | 992 return 1; |
993 } | 993 } |
994 | 994 |
995 if (!first->regex && second->regex) { | |
996 /* shift the regex matches to the end */ | |
997 return -1; | |
998 } | |
999 | |
995 if (first->regex || second->regex) { | 1000 if (first->regex || second->regex) { |
996 /* do not sort the regex matches */ | 1001 /* do not sort the regex matches */ |
997 return 0; | 1002 return 0; |
998 } | 1003 } |
999 | 1004 |
1059 | 1064 |
1060 value = cf->args->elts; | 1065 value = cf->args->elts; |
1061 | 1066 |
1062 if (cf->args->nelts == 3) { | 1067 if (cf->args->nelts == 3) { |
1063 if (value[1].len == 1 && value[1].data[0] == '=') { | 1068 if (value[1].len == 1 && value[1].data[0] == '=') { |
1064 clcf->name.len = value[2].len; | 1069 clcf->name = value[2]; |
1065 clcf->name.data = value[2].data; | |
1066 clcf->exact_match = 1; | 1070 clcf->exact_match = 1; |
1067 | 1071 |
1068 } else if ((value[1].len == 1 && value[1].data[0] == '~') | 1072 } else if ((value[1].len == 1 && value[1].data[0] == '~') |
1069 || (value[1].len == 2 | 1073 || (value[1].len == 2 |
1070 && value[1].data[0] == '~' | 1074 && value[1].data[0] == '~' |
1096 "invalid location modifier \"%V\"", &value[1]); | 1100 "invalid location modifier \"%V\"", &value[1]); |
1097 return NGX_CONF_ERROR; | 1101 return NGX_CONF_ERROR; |
1098 } | 1102 } |
1099 | 1103 |
1100 } else { | 1104 } else { |
1101 clcf->name.len = value[1].len; | 1105 clcf->name = value[1]; |
1102 clcf->name.data = value[1].data; | |
1103 } | 1106 } |
1104 | 1107 |
1105 pclcf = pctx->loc_conf[ngx_http_core_module.ctx_index]; | 1108 pclcf = pctx->loc_conf[ngx_http_core_module.ctx_index]; |
1106 | 1109 |
1107 if (pclcf->name.len == 0) { | 1110 if (pclcf->name.len == 0) { |