From 8852bb49fe4ee5b4d0f27c28d4901f4b6cd5e8c3 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 1 Jun 2011 09:30:12 +0000 Subject: Changes with nginx 1.0.4 01 Jun 2011 *) Change: now regular expressions case sensitivity in the "map" directive is given by prefixes "~" or "~*". *) Feature: now shared zones and caches use POSIX semaphores on Linux. Thanks to Denis F. Latypoff. *) Bugfix: "stalled" cache updating" alert. *) Bugfix: nginx could not be built --without-http_auth_basic_module; the bug had appeared in 1.0.3. --- src/http/modules/ngx_http_map_module.c | 11 +++++++---- src/http/modules/perl/nginx.pm | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/http/modules') diff --git a/src/http/modules/ngx_http_map_module.c b/src/http/modules/ngx_http_map_module.c index 5aa23eba3..6b724b304 100644 --- a/src/http/modules/ngx_http_map_module.c +++ b/src/http/modules/ngx_http_map_module.c @@ -111,7 +111,6 @@ ngx_http_map_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, size_t len; ngx_str_t val; - ngx_uint_t key; ngx_http_variable_value_t *value; ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, @@ -127,9 +126,7 @@ ngx_http_map_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, len--; } - key = ngx_hash_strlow(val.data, val.data, len); - - value = ngx_http_map_find(r, &map->map, key, val.data, len, &val); + value = ngx_http_map_find(r, &map->map, &val); if (value == NULL) { value = map->default_value; @@ -529,6 +526,12 @@ found: ngx_memzero(&rc, sizeof(ngx_regex_compile_t)); + if (value[0].data[0] == '*') { + value[0].len--; + value[0].data++; + rc.options = NGX_REGEX_CASELESS; + } + rc.pattern = value[0]; rc.err.len = NGX_MAX_CONF_ERRSTR; rc.err.data = errstr; diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm index fa2fed8c6..2c88d9afd 100644 --- a/src/http/modules/perl/nginx.pm +++ b/src/http/modules/perl/nginx.pm @@ -48,7 +48,7 @@ our @EXPORT = qw( HTTP_INSUFFICIENT_STORAGE ); -our $VERSION = '1.0.3'; +our $VERSION = '1.0.4'; require XSLoader; XSLoader::load('nginx', $VERSION); -- cgit v1.2.1