Mercurial > hg > nginx
comparison src/http/modules/ngx_http_index_module.c @ 2321:2577098d65ac stable-0.6
r2182 merge:
ignore NGX_EACCES error while directory test
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 20 Nov 2008 17:02:02 +0000 |
parents | 0b5b94805d26 |
children | 4521f4615506 |
comparison
equal
deleted
inserted
replaced
2320:3a00188e49c5 | 2321:2577098d65ac |
---|---|
304 if (of.err == NGX_ENOENT) { | 304 if (of.err == NGX_ENOENT) { |
305 *last = c; | 305 *last = c; |
306 return ngx_http_index_error(r, dir.data, NGX_ENOENT); | 306 return ngx_http_index_error(r, dir.data, NGX_ENOENT); |
307 } | 307 } |
308 | 308 |
309 if (of.err == NGX_EACCES) { | |
310 | |
311 *last = c; | |
312 | |
313 /* | |
314 * ngx_http_index_test_dir() is called after the first index | |
315 * file testing has returned an error distinct from NGX_EACCES. | |
316 * This means that directory searching is allowed. | |
317 */ | |
318 | |
319 return NGX_OK; | |
320 } | |
321 | |
309 ngx_log_error(NGX_LOG_CRIT, r->connection->log, of.err, | 322 ngx_log_error(NGX_LOG_CRIT, r->connection->log, of.err, |
310 ngx_open_file_n " \"%s\" failed", dir.data); | 323 ngx_open_file_n " \"%s\" failed", dir.data); |
311 } | 324 } |
312 | 325 |
313 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 326 return NGX_HTTP_INTERNAL_SERVER_ERROR; |