From aa741f87273f2137d9a52080593c5fe6f1d1b0ea Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Mon, 24 Dec 2018 21:07:05 +0300 Subject: Win32: removed NGX_DIR_MASK concept. Previous interface of ngx_open_dir() assumed that passed directory name has a room for NGX_DIR_MASK at the end (NGX_DIR_MASK_LEN bytes). While all direct users of ngx_dir_open() followed this interface, this also implied similar requirements for indirect uses - in particular, via ngx_walk_tree(). Currently none of ngx_walk_tree() uses provides appropriate space, and fixing this does not look like a right way to go. Instead, ngx_dir_open() interface was changed to not require any additional space and use appropriate allocations instead. --- src/http/modules/ngx_http_autoindex_module.c | 2 -- src/http/modules/ngx_http_random_index_module.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src/http') diff --git a/src/http/modules/ngx_http_autoindex_module.c b/src/http/modules/ngx_http_autoindex_module.c index d59fba237..30fd601ef 100644 --- a/src/http/modules/ngx_http_autoindex_module.c +++ b/src/http/modules/ngx_http_autoindex_module.c @@ -186,8 +186,6 @@ ngx_http_autoindex_handler(ngx_http_request_t *r) return rc; } - /* NGX_DIR_MASK_LEN is lesser than NGX_HTTP_AUTOINDEX_PREALLOCATE */ - last = ngx_http_map_uri_to_path(r, &path, &root, NGX_HTTP_AUTOINDEX_PREALLOCATE); if (last == NULL) { diff --git a/src/http/modules/ngx_http_random_index_module.c b/src/http/modules/ngx_http_random_index_module.c index b47ee4f0d..ed00ad53c 100644 --- a/src/http/modules/ngx_http_random_index_module.c +++ b/src/http/modules/ngx_http_random_index_module.c @@ -98,7 +98,7 @@ ngx_http_random_index_handler(ngx_http_request_t *r) } #if (NGX_HAVE_D_TYPE) - len = NGX_DIR_MASK_LEN; + len = 0; #else len = NGX_HTTP_RANDOM_INDEX_PREALLOCATE; #endif -- cgit