Mercurial > hg > nginx
diff src/http/modules/ngx_http_map_module.c @ 4827:6e46016ea276
Fixed the "include" directive.
The "include" directive should be able to include multiple files if
given a filename mask. Fixed this to work for "include" directives
inside the "map" or "types" blocks. The "include" directive inside
the "geo" block is still not fixed.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 28 Aug 2012 13:31:01 +0000 |
parents | 0656cfe8f7cb |
children | 8b635cf36ccc |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_map_module.c Mon Aug 27 14:21:41 2012 +0000 +++ b/src/http/modules/ngx_http_map_module.c Tue Aug 28 13:31:01 2012 +0000 @@ -369,7 +369,7 @@ ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) { ngx_int_t rc, index; - ngx_str_t *value, file, name; + ngx_str_t *value, name; ngx_uint_t i, key; ngx_http_map_conf_ctx_t *ctx; ngx_http_variable_value_t *var, **vp; @@ -391,15 +391,7 @@ } if (ngx_strcmp(value[0].data, "include") == 0) { - file = value[1]; - - if (ngx_conf_full_name(cf->cycle, &file, 1) != NGX_OK) { - return NGX_CONF_ERROR; - } - - ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data); - - return ngx_conf_parse(cf, &file); + return ngx_conf_include(cf, dummy, conf); } if (value[1].data[0] == '$') {