]> git.kaiwu.me - nginx.git/commitdiff
update r3201: ngx_http_random_index_module should behave consistently
authorIgor Sysoev <igor@sysoev.ru>
Wed, 14 Oct 2009 12:39:41 +0000 (12:39 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 14 Oct 2009 12:39:41 +0000 (12:39 +0000)
in spite of the dirent.d_type presence

src/http/modules/ngx_http_random_index_module.c

index 29491f519c2a1e986b96d04a8198fb1cad53b14c..7b0ec503ce45804244b296e071dc539d69c22d49 100644 (file)
@@ -175,7 +175,7 @@ ngx_http_random_index_handler(ngx_http_request_t *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' */