# HG changeset patch # User Igor Sysoev # Date 1290698669 0 # Node ID d8300807c4f399425e36368805a62822bea13c20 # Parent 19c931be8b9862887ff8b0fe4fed832fd04c3d72 allow empty value as "map" parameter diff --git a/src/http/modules/ngx_http_map_module.c b/src/http/modules/ngx_http_map_module.c --- 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 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 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) {