diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2003-07-02 18:51:41 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2003-07-02 18:51:41 +0000 |
| commit | 9d9f58f24d318dad43c7019c40a187555aaa64c8 (patch) | |
| tree | 0600e4a1f78cf9359472e204604008732e4b301e /src/http/modules | |
| parent | 96c56c9ab6e73f9d92242fdc4f0cc3b64495bd23 (diff) | |
| download | nginx-9d9f58f24d318dad43c7019c40a187555aaa64c8.tar.gz nginx-9d9f58f24d318dad43c7019c40a187555aaa64c8.tar.bz2 | |
nginx-0.0.1-2003-07-02-22:51:41 import
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_charset_filter.c | 8 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_chunked_filter.c | 8 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_index_handler.c | 17 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_range_filter.c | 8 |
4 files changed, 27 insertions, 14 deletions
diff --git a/src/http/modules/ngx_http_charset_filter.c b/src/http/modules/ngx_http_charset_filter.c index baf6d9aba..bcddc9222 100644 --- a/src/http/modules/ngx_http_charset_filter.c +++ b/src/http/modules/ngx_http_charset_filter.c @@ -12,7 +12,7 @@ typedef struct { static void *ngx_http_charset_create_loc_conf(ngx_pool_t *pool); static char *ngx_http_charset_merge_loc_conf(ngx_pool_t *pool, void *parent, void *child); -static int ngx_http_charset_filter_init(ngx_pool_t *pool); +static int ngx_http_charset_filter_init(ngx_cycle_t *cycle, ngx_log_t *log); static ngx_command_t ngx_http_charset_filter_commands[] = { @@ -45,7 +45,9 @@ ngx_module_t ngx_http_charset_filter_module = { &ngx_http_charset_filter_module_ctx, /* module context */ ngx_http_charset_filter_commands, /* module directives */ NGX_HTTP_MODULE, /* module type */ - ngx_http_charset_filter_init /* init module */ + ngx_http_charset_filter_init, /* init module */ + NULL, /* commit module */ + NULL /* rollback module */ }; @@ -85,7 +87,7 @@ static int ngx_http_charset_body_filter(ngx_http_request_t *r, ngx_chain_t *in) #endif -static int ngx_http_charset_filter_init(ngx_pool_t *pool) +static int ngx_http_charset_filter_init(ngx_cycle_t *cycle, ngx_log_t *log) { next_header_filter = ngx_http_top_header_filter; ngx_http_top_header_filter = ngx_http_charset_header_filter; diff --git a/src/http/modules/ngx_http_chunked_filter.c b/src/http/modules/ngx_http_chunked_filter.c index bdd0a7c7a..09b480bc0 100644 --- a/src/http/modules/ngx_http_chunked_filter.c +++ b/src/http/modules/ngx_http_chunked_filter.c @@ -4,7 +4,7 @@ #include <ngx_http.h> -static int ngx_http_chunked_filter_init(ngx_pool_t *pool); +static int ngx_http_chunked_filter_init(ngx_cycle_t *cycle, ngx_log_t *log); static ngx_http_module_t ngx_http_chunked_filter_module_ctx = { @@ -24,7 +24,9 @@ ngx_module_t ngx_http_chunked_filter_module = { &ngx_http_chunked_filter_module_ctx, /* module context */ NULL, /* module directives */ NGX_HTTP_MODULE, /* module type */ - ngx_http_chunked_filter_init /* init module */ + ngx_http_chunked_filter_init, /* init module */ + NULL, /* commit module */ + NULL /* rollback module */ }; @@ -117,7 +119,7 @@ static int ngx_http_chunked_body_filter(ngx_http_request_t *r, ngx_chain_t *in) } -static int ngx_http_chunked_filter_init(ngx_pool_t *pool) +static int ngx_http_chunked_filter_init(ngx_cycle_t *cycle, ngx_log_t *log) { next_header_filter = ngx_http_top_header_filter; ngx_http_top_header_filter = ngx_http_chunked_header_filter; diff --git a/src/http/modules/ngx_http_index_handler.c b/src/http/modules/ngx_http_index_handler.c index ffb9779bf..9af012113 100644 --- a/src/http/modules/ngx_http_index_handler.c +++ b/src/http/modules/ngx_http_index_handler.c @@ -14,7 +14,7 @@ typedef struct { static int ngx_http_index_test_dir(ngx_http_request_t *r); -static int ngx_http_index_init(ngx_pool_t *pool); +static int ngx_http_index_init(ngx_cycle_t *cycle, ngx_log_t *log); static void *ngx_http_index_create_conf(ngx_pool_t *pool); static char *ngx_http_index_merge_conf(ngx_pool_t *p, void *parent, void *child); @@ -52,7 +52,9 @@ ngx_module_t ngx_http_index_module = { &ngx_http_index_module_ctx, /* module context */ ngx_http_index_commands, /* module directives */ NGX_HTTP_MODULE, /* module type */ - ngx_http_index_init /* init module */ + ngx_http_index_init, /* init module */ + NULL, /* commit module */ + NULL /* rollback module */ }; @@ -202,11 +204,16 @@ ngx_log_debug(r->connection->log, "IS_DIR: %s" _ r->path.data); } -static int ngx_http_index_init(ngx_pool_t *pool) +static int ngx_http_index_init(ngx_cycle_t *cycle, ngx_log_t *log) { - ngx_http_handler_pt *h; + ngx_http_handler_pt *h; + ngx_http_conf_ctx_t *ctx; + ngx_http_core_main_conf_t *cmcf; - ngx_test_null(h, ngx_push_array(&ngx_http_index_handlers), NGX_ERROR); + ctx = (ngx_http_conf_ctx_t *) cycle->conf_ctx[ngx_http_module.index]; + cmcf = ctx->main_conf[ngx_http_core_module.ctx_index]; + + ngx_test_null(h, ngx_push_array(&cmcf->index_handlers), NGX_ERROR); *h = ngx_http_index_handler; diff --git a/src/http/modules/ngx_http_range_filter.c b/src/http/modules/ngx_http_range_filter.c index d0273ec1c..125551ebd 100644 --- a/src/http/modules/ngx_http_range_filter.c +++ b/src/http/modules/ngx_http_range_filter.c @@ -9,7 +9,7 @@ typedef struct { } ngx_http_range_filter_ctx_t; -static int ngx_http_range_filter_init(ngx_pool_t *pool); +static int ngx_http_range_filter_init(ngx_cycle_t *cycle, ngx_log_t *log); static ngx_http_module_t ngx_http_range_filter_module_ctx = { @@ -29,7 +29,9 @@ ngx_module_t ngx_http_range_filter_module = { &ngx_http_range_filter_module_ctx, /* module context */ NULL, /* module directives */ NGX_HTTP_MODULE, /* module type */ - ngx_http_range_filter_init /* init module */ + ngx_http_range_filter_init, /* init module */ + NULL, /* commit module */ + NULL /* rollback module */ }; @@ -354,7 +356,7 @@ static int ngx_http_range_body_filter(ngx_http_request_t *r, ngx_chain_t *in) } -static int ngx_http_range_filter_init(ngx_pool_t *pool) +static int ngx_http_range_filter_init(ngx_cycle_t *cycle, ngx_log_t *log) { next_header_filter = ngx_http_top_header_filter; ngx_http_top_header_filter = ngx_http_range_header_filter; |
