From c1817846d29be14903e40a0551f706ff50e09dcf Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 27 Dec 2002 16:22:50 +0000 Subject: nginx-0.0.1-2002-12-27-19:22:50 import --- src/http/modules/ngx_http_index_handler.c | 4 +++- src/http/ngx_http.h | 3 ++- src/http/ngx_http_config.c | 21 ++++++++++++++------- src/http/ngx_http_core.c | 4 +++- src/http/ngx_http_header_filter.c | 4 +++- src/http/ngx_http_output_filter.c | 4 +++- src/http/ngx_http_output_filter.h | 1 + src/http/ngx_http_write_filter.c | 4 ++++ 8 files changed, 33 insertions(+), 12 deletions(-) (limited to 'src/http') diff --git a/src/http/modules/ngx_http_index_handler.c b/src/http/modules/ngx_http_index_handler.c index faddd743a..a85823769 100644 --- a/src/http/modules/ngx_http_index_handler.c +++ b/src/http/modules/ngx_http_index_handler.c @@ -1,10 +1,12 @@ #include + #include #include #include #include -#include +#include + #include #include #include diff --git a/src/http/ngx_http.h b/src/http/ngx_http.h index b6bcfe7cc..4d41bf263 100644 --- a/src/http/ngx_http.h +++ b/src/http/ngx_http.h @@ -3,13 +3,14 @@ #include + #include #include #include #include #include #include -#include +#include #define NGX_HTTP_VERSION_10 1000 diff --git a/src/http/ngx_http_config.c b/src/http/ngx_http_config.c index eb09d5759..205b41ba0 100644 --- a/src/http/ngx_http_config.c +++ b/src/http/ngx_http_config.c @@ -1,7 +1,13 @@ +/* TODO: + ngx_http_conf_ctx_t ctx; on stack or in pool ? */ + + #include + #include -#include +#include + #include #include #include @@ -38,10 +44,11 @@ static ngx_command_t ngx_http_commands[] = { ngx_module_t ngx_http_module = { NULL, /* module context */ ngx_http_commands, /* module directives */ - 0, /* module type */ + NGX_CORE_MODULE_TYPE, /* module type */ NULL /* init module */ }; + static ngx_command_t ngx_http_core_commands[] = { {ngx_string("server"), @@ -83,7 +90,7 @@ static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, char *dummy) { int i; ngx_http_module_t *module; - ngx_http_conf_ctx_t *ctx; + ngx_http_conf_ctx_t ctx; for (i = 0; ngx_modules[i]; i++) { if (ngx_modules[i]->type != NGX_HTTP_MODULE_TYPE) { @@ -98,9 +105,9 @@ static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, char *dummy) ngx_pcalloc(cf->pool, sizeof(void *) * ngx_http_max_module), NGX_CONF_ERROR); - ctx->srv_conf = NULL; - ctx->loc_conf = null_loc_conf; - ctx->locations = NULL; + ctx.srv_conf = NULL; + ctx.loc_conf = null_loc_conf; + ctx.locations = NULL; for (i = 0; ngx_modules[i]; i++) { if (ngx_modules[i]->type != NGX_HTTP_MODULE_TYPE) { @@ -116,7 +123,7 @@ static char *ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, char *dummy) } } - cf->ctx = ctx; + cf->ctx = &ctx; cf->type = NGX_HTTP_MODULE_TYPE; return ngx_conf_parse(cf, NULL); } diff --git a/src/http/ngx_http_core.c b/src/http/ngx_http_core.c index 848dd8e0e..30d8329df 100644 --- a/src/http/ngx_http_core.c +++ b/src/http/ngx_http_core.c @@ -1,7 +1,9 @@ #include + #include -#include +#include + #include #include #include diff --git a/src/http/ngx_http_header_filter.c b/src/http/ngx_http_header_filter.c index aab4e528b..3e8567781 100644 --- a/src/http/ngx_http_header_filter.c +++ b/src/http/ngx_http_header_filter.c @@ -2,11 +2,13 @@ #include #include + #include #include #include #include -#include +#include + #include #include diff --git a/src/http/ngx_http_output_filter.c b/src/http/ngx_http_output_filter.c index f19584580..345a4f161 100644 --- a/src/http/ngx_http_output_filter.c +++ b/src/http/ngx_http_output_filter.c @@ -1,10 +1,12 @@ #include + #include #include #include #include -#include +#include + #include #include #include diff --git a/src/http/ngx_http_output_filter.h b/src/http/ngx_http_output_filter.h index f409b5468..d8df958bf 100644 --- a/src/http/ngx_http_output_filter.h +++ b/src/http/ngx_http_output_filter.h @@ -3,6 +3,7 @@ #include +#include #include diff --git a/src/http/ngx_http_write_filter.c b/src/http/ngx_http_write_filter.c index c4321c7c7..45f6887c9 100644 --- a/src/http/ngx_http_write_filter.c +++ b/src/http/ngx_http_write_filter.c @@ -1,8 +1,12 @@ #include + #include #include +#include + #include + #include #include #include -- cgit