]> git.kaiwu.me - nginx.git/commitdiff
fix mime type for absolute index
authorIgor Sysoev <igor@sysoev.ru>
Tue, 23 Oct 2007 14:10:38 +0000 (14:10 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 23 Oct 2007 14:10:38 +0000 (14:10 +0000)
src/http/modules/ngx_http_index_module.c

index 6f81a49cf347d3a0f7f96999fdf551be3d26088e..bad1de3b02f81ddab735d61ca7789383e1256e0f 100644 (file)
@@ -503,6 +503,10 @@ ngx_http_index_set_index(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
                 ilcf->max_index_len = index->name.len;
             }
 
+            if (index->name.data[0] == '/') {
+                continue;
+            }
+
             /* include the terminating '\0' to the length to use ngx_copy() */
             index->name.len++;