diff options
| author | Ruslan Ermilov <ru@nginx.com> | 2012-08-28 13:31:01 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@nginx.com> | 2012-08-28 13:31:01 +0000 |
| commit | da4ffd8955b14383d6c027004d8beb85395ce9f5 (patch) | |
| tree | 7b75327acd157fc9c48fc0ce93c938cbc12f81a7 /src/http/ngx_http_core_module.c | |
| parent | 43f6163063bc0d4f7477156141c6df651ea5ca8b (diff) | |
| download | nginx-da4ffd8955b14383d6c027004d8beb85395ce9f5.tar.gz nginx-da4ffd8955b14383d6c027004d8beb85395ce9f5.tar.bz2 | |
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.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
| -rw-r--r-- | src/http/ngx_http_core_module.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 8667ae985..5ab9453da 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -3236,7 +3236,7 @@ ngx_http_core_type(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) { ngx_http_core_loc_conf_t *clcf = conf; - ngx_str_t *value, *content_type, *old, file; + ngx_str_t *value, *content_type, *old; ngx_uint_t i, n, hash; ngx_hash_key_t *type; @@ -3249,15 +3249,8 @@ ngx_http_core_type(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) " in \"include\" directive"); return NGX_CONF_ERROR; } - 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); } content_type = ngx_palloc(cf->pool, sizeof(ngx_str_t)); |
