summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-11-16 19:25:43 +0000
committerJonathan Kolb <jon@b0g.us>2009-11-16 19:25:43 +0000
commit8d6a05aa1b11c222b64d85abf0679670ad119973 (patch)
tree31c19d0986aeeddad69cf69a152e0955595ee3d3
parentcd5717636b57c376dab42994e210a64ac2b4314a (diff)
downloadnginx-8d6a05aa1b11c222b64d85abf0679670ad119973.tar.gz
Changes with nginx 0.8.26 16 Nov 2009v0.8.26
*) Bugfix: in captures usage in "rewrite" directive; the bug had appeared in 0.8.25. *) Bugfix: nginx could not be built without the --with-debug option; the bug had appeared in 0.8.25.
-rw-r--r--CHANGES9
-rw-r--r--CHANGES.ru13
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/http/modules/perl/nginx.pm2
-rw-r--r--src/http/ngx_http_core_module.c4
-rw-r--r--src/http/ngx_http_script.c6
-rw-r--r--src/http/ngx_http_variables.c4
-rw-r--r--src/os/unix/ngx_alloc.c4
8 files changed, 34 insertions, 12 deletions
diff --git a/CHANGES b/CHANGES
index 8e72c9259..b78ac0522 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,13 @@
+Changes with nginx 0.8.26 16 Nov 2009
+
+ *) Bugfix: in captures usage in "rewrite" directive; the bug had
+ appeared in 0.8.25.
+
+ *) Bugfix: nginx could not be built without the --with-debug option;
+ the bug had appeared in 0.8.25.
+
+
Changes with nginx 0.8.25 16 Nov 2009
*) Change: now no message is written in an error log if a variable is
diff --git a/CHANGES.ru b/CHANGES.ru
index 11472b759..b27115655 100644
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,13 @@
+Изменения в nginx 0.8.26 16.11.2009
+
+ *) Исправление: ошибки при использовании выделений в директиве rewrite;
+ ошибка появилась в 0.8.25.
+
+ *) Исправление: nginx не собирался без параметра --with-debug; ошибка
+ появилась в 0.8.25.
+
+
Изменения в nginx 0.8.25 16.11.2009
*) Изменение: теперь в лог ошибок не пишется сообщение, если переменная
@@ -17,8 +26,8 @@
недостатке памяти; ошибка появилась в 0.8.18.
*) Исправление: nginx передавал сжатые ответы клиентам, не
- поддерживающим сжатие при настройках gzip_static on и gzip_vary off;
- ошибка появилась в 0.8.16.
+ поддерживающим сжатие, при настройках gzip_static on и gzip_vary
+ off; ошибка появилась в 0.8.16.
Изменения в nginx 0.8.24 11.11.2009
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 375442288..95458eec7 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,8 +8,8 @@
#define _NGINX_H_INCLUDED_
-#define nginx_version 8025
-#define NGINX_VERSION "0.8.25"
+#define nginx_version 8026
+#define NGINX_VERSION "0.8.26"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm
index c9e3cd25f..f863ad450 100644
--- a/src/http/modules/perl/nginx.pm
+++ b/src/http/modules/perl/nginx.pm
@@ -47,7 +47,7 @@ our @EXPORT = qw(
HTTP_INSUFFICIENT_STORAGE
);
-our $VERSION = '0.8.25';
+our $VERSION = '0.8.26';
require XSLoader;
XSLoader::load('nginx', $VERSION);
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 7ae49a686..e6b1162a0 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -2759,6 +2759,10 @@ ngx_http_core_init_main_conf(ngx_conf_t *cf, void *conf)
cmcf->variables_hash_bucket_size =
ngx_align(cmcf->variables_hash_bucket_size, ngx_cacheline_size);
+ if (cmcf->ncaptures) {
+ cmcf->ncaptures = (cmcf->ncaptures + 1) * 3;
+ }
+
return NGX_CONF_OK;
}
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c
index b809e2b98..aa03df007 100644
--- a/src/http/ngx_http_script.c
+++ b/src/http/ngx_http_script.c
@@ -910,14 +910,14 @@ ngx_http_script_regex_start_code(ngx_http_script_engine_t *e)
e->buf.len = code->size;
if (code->uri) {
- if (rc && (r->quoted_uri || r->plus_in_uri)) {
+ if (r->ncaptures && (r->quoted_uri || r->plus_in_uri)) {
e->buf.len += 2 * ngx_escape_uri(NULL, r->uri.data, r->uri.len,
NGX_ESCAPE_ARGS);
}
}
- for (n = 1; n < (ngx_uint_t) rc; n++) {
- e->buf.len += r->captures[2 * n + 1] - r->captures[2 * n];
+ for (n = 2; n < r->ncaptures; n += 2) {
+ e->buf.len += r->captures[n + 1] - r->captures[n];
}
} else {
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index 633b31084..a2852b0dd 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -1759,7 +1759,7 @@ ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re, ngx_str_t *s)
cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
if (re->ncaptures) {
- len = (cmcf->ncaptures + 1) * 3;
+ len = cmcf->ncaptures;
if (r->captures == NULL) {
r->captures = ngx_palloc(r->pool, len * sizeof(int));
@@ -1810,7 +1810,7 @@ ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re, ngx_str_t *s)
#endif
}
- r->ncaptures = len;
+ r->ncaptures = rc * 2;
r->captures_data = s->data;
return NGX_OK;
diff --git a/src/os/unix/ngx_alloc.c b/src/os/unix/ngx_alloc.c
index 860666a65..c71a10254 100644
--- a/src/os/unix/ngx_alloc.c
+++ b/src/os/unix/ngx_alloc.c
@@ -61,7 +61,7 @@ ngx_memalign(size_t alignment, size_t size, ngx_log_t *log)
p = NULL;
}
- ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0,
+ ngx_log_debug3(NGX_LOG_DEBUG_ALLOC, log, 0,
"posix_memalign: %p:%uz @%uz", p, size, alignment);
return p;
@@ -80,7 +80,7 @@ ngx_memalign(size_t alignment, size_t size, ngx_log_t *log)
"memalign(%uz, %uz) failed", alignment, size);
}
- ngx_log_debug2(NGX_LOG_DEBUG_ALLOC, log, 0,
+ ngx_log_debug3(NGX_LOG_DEBUG_ALLOC, log, 0,
"memalign: %p:%uz @%uz", p, size, alignment);
return p;