aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_map_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-11-25 15:24:29 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-11-25 15:24:29 +0000
commit04e145d2dae00c4dbec354b6921e65515e4fdd85 (patch)
treef95ca2c46cda101c955e9375098dbd6f092a8ba1 /src/http/modules/ngx_http_map_module.c
parent67e6bafc90edd1adbbbddc989054099fb20e3b4b (diff)
downloadnginx-04e145d2dae00c4dbec354b6921e65515e4fdd85.tar.gz
nginx-04e145d2dae00c4dbec354b6921e65515e4fdd85.zip
allow empty value as "map" parameter
Diffstat (limited to 'src/http/modules/ngx_http_map_module.c')
-rw-r--r--src/http/modules/ngx_http_map_module.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/http/modules/ngx_http_map_module.c b/src/http/modules/ngx_http_map_module.c
index 6587cc54e..8f925a10c 100644
--- a/src/http/modules/ngx_http_map_module.c
+++ b/src/http/modules/ngx_http_map_module.c
@@ -122,11 +122,6 @@ ngx_http_map_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v,
len--;
}
- if (len == 0) {
- *v = *map->default_value;
- return NGX_OK;
- }
-
key = ngx_hash_strlow(val.data, val.data, len);
value = ngx_hash_find_combined(&map->hash, key, val.data, len);
@@ -357,11 +352,6 @@ ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"invalid number of the map parameters");
return NGX_CONF_ERROR;
-
- } else if (value[0].len == 0) {
- ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "invalid first parameter");
- return NGX_CONF_ERROR;
}
if (ngx_strcmp(value[0].data, "include") == 0) {