diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-07-02 14:41:17 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-07-02 14:41:17 +0000 |
commit | 96c56c9ab6e73f9d92242fdc4f0cc3b64495bd23 (patch) | |
tree | 643c8cf608d27cb9db0624d7099258891ac63689 /src/http/ngx_http_core_module.c | |
parent | bc5c28714a2db990e9d1bfca66480efeb7b6052a (diff) | |
download | nginx-96c56c9ab6e73f9d92242fdc4f0cc3b64495bd23.tar.gz nginx-96c56c9ab6e73f9d92242fdc4f0cc3b64495bd23.zip |
nginx-0.0.1-2003-07-02-18:41:17 import
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r-- | src/http/ngx_http_core_module.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index c1024e25c..4cc4388f2 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -20,7 +20,7 @@ static void *ngx_http_core_create_loc_conf(ngx_pool_t *pool); static char *ngx_http_core_merge_loc_conf(ngx_pool_t *pool, void *parent, void *child); -static int ngx_http_core_init(ngx_pool_t *pool); +static int ngx_http_core_init(ngx_cycle_t *cycle, ngx_log_t *log); static char *ngx_server_block(ngx_conf_t *cf, ngx_command_t *cmd, void *dummy); static int ngx_cmp_locations(const void *first, const void *second); static char *ngx_location_block(ngx_conf_t *cf, ngx_command_t *cmd, @@ -186,17 +186,20 @@ ngx_module_t ngx_http_core_module = { &ngx_http_core_module_ctx, /* module context */ ngx_http_core_commands, /* module directives */ NGX_HTTP_MODULE, /* module type */ - ngx_http_core_init /* init module */ + ngx_http_core_init, /* init module */ + NULL, /* commit module */ + NULL /* rollback module */ }; void ngx_http_handler(ngx_http_request_t *r) { - int rc, i; - ngx_http_log_ctx_t *lcx; - ngx_http_handler_pt *h; - ngx_http_core_loc_conf_t *clcf, **clcfp; - ngx_http_core_srv_conf_t *cscf; + int rc, i; + ngx_http_log_ctx_t *lcx; + ngx_http_handler_pt *h; + ngx_http_core_loc_conf_t *clcf, **clcfp; + ngx_http_core_srv_conf_t *cscf; + ngx_http_core_main_conf_t *cmcf; r->connection->unexpected_eof = 0; @@ -248,10 +251,12 @@ ngx_log_debug(r->connection->log, "rc: %d" _ rc); r->filter = NGX_HTTP_FILTER_NEED_IN_MEMORY; } + cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); + /* run translation phase */ - h = ngx_http_translate_handlers.elts; - for (i = ngx_http_translate_handlers.nelts - 1; i >= 0; i--) { + h = cmcf->translate_handlers.elts; + for (i = cmcf->translate_handlers.nelts - 1; i >= 0; i--) { rc = h[i](r); @@ -521,7 +526,7 @@ int ngx_http_internal_redirect(ngx_http_request_t *r, } -static int ngx_http_core_init(ngx_pool_t *pool) +static int ngx_http_core_init(ngx_cycle_t *cycle, ngx_log_t *log) { ngx_http_handler_pt *h; |