Mercurial > hg > nginx
comparison src/http/modules/ngx_http_index_handler.c @ 148:5afee0074707
nginx-0.0.1-2003-10-17-00:19:16 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 16 Oct 2003 20:19:16 +0000 |
parents | ef8c87afcfc5 |
children | 4db54fdbcbe7 |
comparison
equal
deleted
inserted
replaced
147:be71fca7f9d7 | 148:5afee0074707 |
---|---|
77 * that path contains the usual file in place of the directory. | 77 * that path contains the usual file in place of the directory. |
78 */ | 78 */ |
79 | 79 |
80 int ngx_http_index_handler(ngx_http_request_t *r) | 80 int ngx_http_index_handler(ngx_http_request_t *r) |
81 { | 81 { |
82 int i, rc, test_dir, path_not_found; | 82 int rc; |
83 char *name, *file; | 83 char *name, *file; |
84 ngx_str_t redirect, *index; | 84 ngx_str_t redirect, *index; |
85 ngx_err_t err; | 85 ngx_err_t err; |
86 ngx_fd_t fd; | 86 ngx_fd_t fd; |
87 ngx_http_index_ctx_t *ctx; | 87 ngx_http_index_ctx_t *ctx; |
130 name = r->path.data; | 130 name = r->path.data; |
131 } | 131 } |
132 | 132 |
133 fd = ngx_open_file(name, NGX_FILE_RDONLY, NGX_FILE_OPEN); | 133 fd = ngx_open_file(name, NGX_FILE_RDONLY, NGX_FILE_OPEN); |
134 | 134 |
135 if (fd == NGX_AGAIN) { | 135 if (fd == (ngx_fd_t) NGX_AGAIN) { |
136 return NGX_AGAIN; | 136 return NGX_AGAIN; |
137 } | 137 } |
138 | 138 |
139 if (fd == NGX_INVALID_FILE) { | 139 if (fd == NGX_INVALID_FILE) { |
140 err = ngx_errno; | 140 err = ngx_errno; |