diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-08-30 10:39:17 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-08-30 10:39:17 +0000 |
commit | da173abde0afa26b02c778d6475462ed487594c5 (patch) | |
tree | 25362ec56c889a2284e6feb341d5b87f13b5beab /src/http/modules/ngx_http_autoindex_module.c | |
parent | 9cdd8a1cbcf70527db51eeab707a5bc05babdcf3 (diff) | |
download | nginx-release-0.4.0.tar.gz nginx-release-0.4.0.zip |
nginx-0.4.0-RELEASE importrelease-0.4.0
*) Change in internal API: the HTTP modules initialization was moved
from the init module phase to the HTTP postconfiguration phase.
*) Change: now the request body is not read beforehand for the
ngx_http_perl_module: it's required to start the reading using the
$r->has_request_body method.
*) Feature: the ngx_http_perl_module supports the DECLINED return code.
*) Feature: the ngx_http_dav_module supports the incoming "Date" header
line for the PUT method.
*) Feature: the "ssi" directive is available inside the "if" block.
*) Bugfix: a segmentation fault occurred if there was an "index"
directive with variables and the first index name was without
variables; the bug had appeared in 0.1.29.
Diffstat (limited to 'src/http/modules/ngx_http_autoindex_module.c')
-rw-r--r-- | src/http/modules/ngx_http_autoindex_module.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/http/modules/ngx_http_autoindex_module.c b/src/http/modules/ngx_http_autoindex_module.c index 7064f37c2..1c7709376 100644 --- a/src/http/modules/ngx_http_autoindex_module.c +++ b/src/http/modules/ngx_http_autoindex_module.c @@ -48,7 +48,7 @@ static int ngx_libc_cdecl ngx_http_autoindex_cmp_entries(const void *one, const void *two); static ngx_int_t ngx_http_autoindex_error(ngx_http_request_t *r, ngx_dir_t *dir, ngx_str_t *name); -static ngx_int_t ngx_http_autoindex_init(ngx_cycle_t *cycle); +static ngx_int_t ngx_http_autoindex_init(ngx_conf_t *cf); static void *ngx_http_autoindex_create_loc_conf(ngx_conf_t *cf); static char *ngx_http_autoindex_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child); @@ -83,7 +83,7 @@ static ngx_command_t ngx_http_autoindex_commands[] = { static ngx_http_module_t ngx_http_autoindex_module_ctx = { NULL, /* preconfiguration */ - NULL, /* postconfiguration */ + ngx_http_autoindex_init, /* postconfiguration */ NULL, /* create main configuration */ NULL, /* init main configuration */ @@ -102,7 +102,7 @@ ngx_module_t ngx_http_autoindex_module = { ngx_http_autoindex_commands, /* module directives */ NGX_HTTP_MODULE, /* module type */ NULL, /* init master */ - ngx_http_autoindex_init, /* init module */ + NULL, /* init module */ NULL, /* init process */ NULL, /* init thread */ NULL, /* exit thread */ @@ -590,25 +590,6 @@ ngx_http_autoindex_error(ngx_http_request_t *r, ngx_dir_t *dir, ngx_str_t *name) } -static ngx_int_t -ngx_http_autoindex_init(ngx_cycle_t *cycle) -{ - ngx_http_handler_pt *h; - ngx_http_core_main_conf_t *cmcf; - - cmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_core_module); - - h = ngx_array_push(&cmcf->phases[NGX_HTTP_CONTENT_PHASE].handlers); - if (h == NULL) { - return NGX_ERROR; - } - - *h = ngx_http_autoindex_handler; - - return NGX_OK; -} - - static void * ngx_http_autoindex_create_loc_conf(ngx_conf_t *cf) { @@ -639,3 +620,22 @@ ngx_http_autoindex_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) return NGX_CONF_OK; } + + +static ngx_int_t +ngx_http_autoindex_init(ngx_conf_t *cf) +{ + ngx_http_handler_pt *h; + ngx_http_core_main_conf_t *cmcf; + + cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module); + + h = ngx_array_push(&cmcf->phases[NGX_HTTP_CONTENT_PHASE].handlers); + if (h == NULL) { + return NGX_ERROR; + } + + *h = ngx_http_autoindex_handler; + + return NGX_OK; +} |