summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES6
-rw-r--r--CHANGES.ru6
-rw-r--r--src/core/nginx.h2
-rw-r--r--src/http/ngx_http_core_module.c11
4 files changed, 20 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 431bc903c..2e0755ec2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,10 @@
+Changes with nginx 0.1.6 11 Nov 2004
+
+ *) Bugfix: some location directive combiations with the regular
+ expressions caused the wrong configuration choose.
+
+
Changes with nginx 0.1.5 11 Nov 2004
*) Bugfix: on Solaris and Linux there may be too many "recvmsg() returned
diff --git a/CHANGES.ru b/CHANGES.ru
index a6e54c9cb..c4d3d5276 100644
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,10 @@
+Изменения в nginx 0.1.6 11.11.2004
+
+ *) Исправление: при некоторых комбинациях директив location c регулярными
+ выражениями использовалась конфигурация не из того location.
+
+
Изменения в nginx 0.1.5 11.11.2004
*) Исправление: на Solaris и Linux могло быть очень много сообщений
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 2be26e06b..a8c5ca1ba 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
#define _NGINX_H_INCLUDED_
-#define NGINX_VER "nginx/0.1.5"
+#define NGINX_VER "nginx/0.1.6"
#define NGINX_VAR "NGINX"
#define NGX_NEWPID_EXT ".newbin"
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 7e8cf6903..29a6f76fc 100644
--- 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 *one, const void *two)
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_t *cf, ngx_command_t *cmd, void *dummy)
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_t *cf, ngx_command_t *cmd, void *dummy)
}
} 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];