# HG changeset patch # User Igor Sysoev # Date 1255523981 0 # Node ID a56cccd588e674e036b9e04a7448764758e206c6 # Parent 121fae8c673c13e98ff78aa7c64d14ae3dec18fa update r3201: ngx_http_random_index_module should behave consistently in spite of the dirent.d_type presence diff --git a/src/http/modules/ngx_http_random_index_module.c b/src/http/modules/ngx_http_random_index_module.c --- 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_r len = ngx_de_namelen(&dir); - if (dir.type == 0) { + if (dir.type == 0 || ngx_de_is_link(&dir)) { /* 1 byte for '/' and 1 byte for terminating '\0' */