aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_random_index_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-10-14 11:33:35 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-10-14 11:33:35 +0000
commite58700d3b08bee27db7206c2eefe858ad0488b4a (patch)
treecf325092d4040941f6e028b41a4cc967573d6a23 /src/http/modules/ngx_http_random_index_module.c
parente7138540d603336a0f2187d8cf20d24b54ed265e (diff)
downloadnginx-e58700d3b08bee27db7206c2eefe858ad0488b4a.tar.gz
nginx-e58700d3b08bee27db7206c2eefe858ad0488b4a.zip
*) 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
Diffstat (limited to 'src/http/modules/ngx_http_random_index_module.c')
-rw-r--r--src/http/modules/ngx_http_random_index_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_random_index_module.c b/src/http/modules/ngx_http_random_index_module.c
index bb5544ae6..29491f519 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) {
/* 1 byte for '/' and 1 byte for terminating '\0' */