comparison src/http/modules/ngx_http_autoindex_handler.c @ 46:9f3205d496a0 NGINX_0_1_23

nginx 0.1.23 *) Feature: the ngx_http_ssi_filter_module and the ssi, ssi_silent_errors, and ssi_min_file_chunk directives. The 'echo var="HTTP_..." default=""' and 'echo var="REMOTE_ADDR"' commands are supported. *) Feature: the %request_time log parameter. *) Feature: if the request has no the "Host" header line, then the "proxy_preserve_host" directive set this header line to the first server name of the "server_name" directive. *) Bugfix: nginx could not be built on platforms different from i386, amd64, sparc É ppc; bug appeared in 0.1.22. *) Bugfix: the ngx_http_autoindex_module now shows the information not about the symlink, but about file or directory it points to. *) Bugfix: the %apache_length parameter logged the negative length of the response header if the no response was transferred to a client.
author Igor Sysoev <http://sysoev.ru>
date Tue, 01 Mar 2005 00:00:00 +0300
parents 2879cd3a40cb
children 6cfc63e68377
comparison
equal deleted inserted replaced
45:09c688b472a7 46:9f3205d496a0
239 continue; 239 continue;
240 } 240 }
241 241
242 if (len == 2 242 if (len == 2
243 && ngx_de_name(&dir)[0] == '.' 243 && ngx_de_name(&dir)[0] == '.'
244 && ngx_de_name(&dir)[0] == '.') 244 && ngx_de_name(&dir)[1] == '.')
245 { 245 {
246 continue; 246 continue;
247 } 247 }
248 248
249 if (!dir.valid_info) { 249 if (!dir.valid_info) {
261 } 261 }
262 262
263 ngx_cpystrn(last, ngx_de_name(&dir), len + 1); 263 ngx_cpystrn(last, ngx_de_name(&dir), len + 1);
264 264
265 if (ngx_de_info(fname.data, &dir) == NGX_FILE_ERROR) { 265 if (ngx_de_info(fname.data, &dir) == NGX_FILE_ERROR) {
266 ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno, 266 err = ngx_errno;
267 ngx_de_info_n " \"%s\" failed", fname.data); 267
268 return ngx_http_autoindex_error(r, &dir, dname.data); 268 if (err != NGX_ENOENT) {
269 ngx_log_error(NGX_LOG_CRIT, r->connection->log, err,
270 ngx_de_info_n " \"%s\" failed", fname.data);
271 return ngx_http_autoindex_error(r, &dir, dname.data);
272 }
273
274 if (ngx_de_link_info(fname.data, &dir) == NGX_FILE_ERROR) {
275 ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
276 ngx_de_link_info_n " \"%s\" failed",
277 fname.data);
278 return ngx_http_autoindex_error(r, &dir, dname.data);
279 }
269 } 280 }
270 } 281 }
271 282
272 if (!(entry = ngx_array_push(&entries))) { 283 if (!(entry = ngx_array_push(&entries))) {
273 return ngx_http_autoindex_error(r, &dir, dname.data); 284 return ngx_http_autoindex_error(r, &dir, dname.data);