comparison src/http/modules/ngx_http_index_module.c @ 578:f3a9e57d2e17

Merge with current.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 11 Mar 2010 21:27:17 +0300
parents f7ec98e3caeb
children ff463db0be31
comparison
equal deleted inserted replaced
539:5f4de8cf0d9d 578:f3a9e57d2e17
203 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 203 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
204 "open index \"%V\"", &path); 204 "open index \"%V\"", &path);
205 205
206 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); 206 ngx_memzero(&of, sizeof(ngx_open_file_info_t));
207 207
208 of.read_ahead = clcf->read_ahead;
208 of.directio = clcf->directio; 209 of.directio = clcf->directio;
209 of.valid = clcf->open_file_cache_valid; 210 of.valid = clcf->open_file_cache_valid;
210 of.min_uses = clcf->open_file_cache_min_uses; 211 of.min_uses = clcf->open_file_cache_min_uses;
211 of.test_only = 1; 212 of.test_only = 1;
212 of.errors = clcf->open_file_cache_errors; 213 of.errors = clcf->open_file_cache_errors;
220 221
221 if (of.err == 0) { 222 if (of.err == 0) {
222 return NGX_HTTP_INTERNAL_SERVER_ERROR; 223 return NGX_HTTP_INTERNAL_SERVER_ERROR;
223 } 224 }
224 225
225 if (of.err == NGX_ENOTDIR || of.err == NGX_EACCES) { 226 if (of.err == NGX_ENOTDIR
227 || of.err == NGX_ENAMETOOLONG
228 || of.err == NGX_EACCES)
229 {
226 return ngx_http_index_error(r, clcf, path.data, of.err); 230 return ngx_http_index_error(r, clcf, path.data, of.err);
227 } 231 }
228 232
229 if (!dir_tested) { 233 if (!dir_tested) {
230 rc = ngx_http_index_test_dir(r, clcf, path.data, name - 1); 234 rc = ngx_http_index_test_dir(r, clcf, path.data, name - 1);