comparison src/http/modules/ngx_http_autoindex_module.c @ 7433:061ec464813f

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 24 Dec 2018 21:07:05 +0300
parents 170922952477
children a91b93f3f3e7
comparison
equal deleted inserted replaced
7432:ecc97cb0eda4 7433:061ec464813f
184 184
185 if (rc != NGX_OK) { 185 if (rc != NGX_OK) {
186 return rc; 186 return rc;
187 } 187 }
188 188
189 /* NGX_DIR_MASK_LEN is lesser than NGX_HTTP_AUTOINDEX_PREALLOCATE */
190
191 last = ngx_http_map_uri_to_path(r, &path, &root, 189 last = ngx_http_map_uri_to_path(r, &path, &root,
192 NGX_HTTP_AUTOINDEX_PREALLOCATE); 190 NGX_HTTP_AUTOINDEX_PREALLOCATE);
193 if (last == NULL) { 191 if (last == NULL) {
194 return NGX_HTTP_INTERNAL_SERVER_ERROR; 192 return NGX_HTTP_INTERNAL_SERVER_ERROR;
195 } 193 }