Mercurial > hg > nginx
comparison src/http/modules/ngx_http_index_module.c @ 2181:774bef502c78
ignore NGX_EACCES error while directory test
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 17 Aug 2008 17:38:48 +0000 |
parents | e21f3b073843 |
children | 5c0c7f65f8f0 |
comparison
equal
deleted
inserted
replaced
2180:61a09532e310 | 2181:774bef502c78 |
---|---|
307 if (of.err == NGX_ENOENT) { | 307 if (of.err == NGX_ENOENT) { |
308 *last = c; | 308 *last = c; |
309 return ngx_http_index_error(r, clcf, dir.data, NGX_ENOENT); | 309 return ngx_http_index_error(r, clcf, dir.data, NGX_ENOENT); |
310 } | 310 } |
311 | 311 |
312 if (of.err == NGX_EACCES) { | |
313 | |
314 *last = c; | |
315 | |
316 /* | |
317 * ngx_http_index_test_dir() is called after the first index | |
318 * file testing has returned an error distinct from NGX_EACCES. | |
319 * This means that directory searching is allowed. | |
320 */ | |
321 | |
322 return NGX_OK; | |
323 } | |
324 | |
312 ngx_log_error(NGX_LOG_CRIT, r->connection->log, of.err, | 325 ngx_log_error(NGX_LOG_CRIT, r->connection->log, of.err, |
313 ngx_open_file_n " \"%s\" failed", dir.data); | 326 ngx_open_file_n " \"%s\" failed", dir.data); |
314 } | 327 } |
315 | 328 |
316 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 329 return NGX_HTTP_INTERNAL_SERVER_ERROR; |