From af7e5336829540d80490fc4fa7153ce2efb95954 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 1 Feb 2010 14:52:25 +0000 Subject: merge r3201, r3204, r3411: ngx_http_autoindex_module fixes: *) reset cached dirent.d_type after stat() this fixes slash after link to a directory in ngx_http_autoindex_module; *) use cached dirent.d_type as hint on all systems the issues has been introduced in r2235 *) fix ngx_utf8_cpystrn(): it did not fully copy utf-8 string --- src/http/modules/ngx_http_random_index_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/http/modules') diff --git a/src/http/modules/ngx_http_random_index_module.c b/src/http/modules/ngx_http_random_index_module.c index bb5544ae6..7b0ec503c 100644 --- a/src/http/modules/ngx_http_random_index_module.c +++ b/src/http/modules/ngx_http_random_index_module.c @@ -175,7 +175,7 @@ ngx_http_random_index_handler(ngx_http_request_t *r) len = ngx_de_namelen(&dir); - if (!dir.valid_type) { + if (dir.type == 0 || ngx_de_is_link(&dir)) { /* 1 byte for '/' and 1 byte for terminating '\0' */ -- cgit