diff options
author | Valentin Bartenev <vbart@nginx.com> | 2012-02-27 16:51:28 +0000 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2012-02-27 16:51:28 +0000 |
commit | 0e05ca0404b6ef99fd809c6a1c362c6ef923cca6 (patch) | |
tree | 4a302c720b6fc8aa510fda227a6e6feb0e82ee92 /src/http/modules/ngx_http_static_module.c | |
parent | 346791187f358f852c2434f29a86754e7ab10f5b (diff) | |
download | nginx-0e05ca0404b6ef99fd809c6a1c362c6ef923cca6.tar.gz nginx-0e05ca0404b6ef99fd809c6a1c362c6ef923cca6.zip |
Disable symlinks: initialization of the "disable_symlinks" field in
ngx_open_file_info_t moved to a separate function.
This is preparation for the "from=" parameter implementation of the
"disable_symlinks" directive.
Diffstat (limited to 'src/http/modules/ngx_http_static_module.c')
-rw-r--r-- | src/http/modules/ngx_http_static_module.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c index f4904fc00..9d77e43b1 100644 --- a/src/http/modules/ngx_http_static_module.c +++ b/src/http/modules/ngx_http_static_module.c @@ -94,9 +94,10 @@ ngx_http_static_handler(ngx_http_request_t *r) of.min_uses = clcf->open_file_cache_min_uses; of.errors = clcf->open_file_cache_errors; of.events = clcf->open_file_cache_events; -#if (NGX_HAVE_OPENAT) - of.disable_symlinks = clcf->disable_symlinks; -#endif + + if (ngx_http_set_disable_symlinks(r, clcf, &path, &of) != NGX_OK) { + return NGX_HTTP_INTERNAL_SERVER_ERROR; + } if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) != NGX_OK) |