comparison src/http/modules/ngx_http_index_handler.c @ 22:8b6db3bda591 NGINX_0_1_11

nginx 0.1.11 *) Feature: the worker_priority directive. *) Change: both tcp_nopush and tcp_nodelay directives affect the transferred response. *) Bugfix: nginx did not call initgroups(). Thanks to Andrew Sitnikov and Andrei Nigmatulin. *) Change: now the ngx_http_autoindex_module shows the file size in the bytes. *) Bugfix: the ngx_http_autoindex_module returned the 500 error if the broken symlink was in a directory. *) Bugfix: the files bigger than 4G could not be transferred using sendfile. *) Bugfix: if the backend was resolved to several backends and there was an error while the response waiting then process may got caught in an endless loop. *) Bugfix: the worker process may exit with the "unknown cycle" message when the /dev/poll method was used. *) Bugfix: "close() channel failed" errors. *) Bugfix: the autodetection of the "nobody" and "nogroup" groups. *) Bugfix: the send_lowat directive did not work on Linux. *) Bugfix: the segmentation fault occurred if there was no events section in configuration. *) Bugfix: nginx could not be built on OpenBSD. *) Bugfix: the double slashes in "://" in the URI were converted to ":/".
author Igor Sysoev <http://sysoev.ru>
date Thu, 02 Dec 2004 00:00:00 +0300
parents 6f8b0dc0f8dd
children 420dd3f9e703
comparison
equal deleted inserted replaced
21:4eeb9cfef970 22:8b6db3bda591
446 void *parent, void *child) 446 void *parent, void *child)
447 { 447 {
448 ngx_http_index_loc_conf_t *prev = parent; 448 ngx_http_index_loc_conf_t *prev = parent;
449 ngx_http_index_loc_conf_t *conf = child; 449 ngx_http_index_loc_conf_t *conf = child;
450 450
451 ngx_uint_t i; 451 ngx_str_t *index;
452 ngx_str_t *index, *prev_index;
453 452
454 if (conf->max_index_len == 0) { 453 if (conf->max_index_len == 0) {
455 if (prev->max_index_len != 0) { 454 if (prev->max_index_len != 0) {
456 ngx_memcpy(conf, prev, sizeof(ngx_http_index_loc_conf_t)); 455 ngx_memcpy(conf, prev, sizeof(ngx_http_index_loc_conf_t));
457 return NGX_CONF_OK; 456 return NGX_CONF_OK;
462 index->data = (u_char *) NGX_HTTP_DEFAULT_INDEX; 461 index->data = (u_char *) NGX_HTTP_DEFAULT_INDEX;
463 conf->max_index_len = sizeof(NGX_HTTP_DEFAULT_INDEX); 462 conf->max_index_len = sizeof(NGX_HTTP_DEFAULT_INDEX);
464 463
465 return NGX_CONF_OK; 464 return NGX_CONF_OK;
466 } 465 }
466
467 #if 0
467 468
468 if (prev->max_index_len != 0) { 469 if (prev->max_index_len != 0) {
469 470
470 prev_index = prev->indices.elts; 471 prev_index = prev->indices.elts;
471 for (i = 0; i < prev->indices.nelts; i++) { 472 for (i = 0; i < prev->indices.nelts; i++) {
474 index->len = prev_index[i].len; 475 index->len = prev_index[i].len;
475 index->data = prev_index[i].data; 476 index->data = prev_index[i].data;
476 } 477 }
477 } 478 }
478 479
480 #endif
481
479 if (conf->max_index_len < prev->max_index_len) { 482 if (conf->max_index_len < prev->max_index_len) {
480 conf->max_index_len = prev->max_index_len; 483 conf->max_index_len = prev->max_index_len;
481 } 484 }
482 485
483 if (conf->index_cache == NULL) { 486 if (conf->index_cache == NULL) {