comparison src/http/ngx_http_core_module.c @ 90:37530da31268

nginx-0.0.1-2003-05-16-19:27:48 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 16 May 2003 15:27:48 +0000
parents 29bf798b583f
children 637625a2acdb
comparison
equal deleted inserted replaced
89:29bf798b583f 90:37530da31268
72 NULL}, 72 NULL},
73 73
74 {ngx_string("client_header_buffer_size"), 74 {ngx_string("client_header_buffer_size"),
75 NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, 75 NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1,
76 ngx_conf_set_size_slot, 76 ngx_conf_set_size_slot,
77 0, 77 NGX_HTTP_MAIN_CONF_OFFSET,
78 addressof(ngx_http_client_header_buffer_size), 78 offsetof(ngx_http_core_main_conf_t, client_header_buffer_size),
79 NULL}, 79 NULL},
80 80
81 {ngx_string("large_client_header"), 81 {ngx_string("large_client_header"),
82 NGX_HTTP_MAIN_CONF|NGX_CONF_FLAG, 82 NGX_HTTP_MAIN_CONF|NGX_CONF_FLAG,
83 ngx_conf_set_flag_slot, 83 ngx_conf_set_flag_slot,
155 ngx_http_core_merge_loc_conf /* merge location config */ 155 ngx_http_core_merge_loc_conf /* merge location config */
156 }; 156 };
157 157
158 158
159 ngx_module_t ngx_http_core_module = { 159 ngx_module_t ngx_http_core_module = {
160 &ngx_http_core_module_ctx, /* module context */
160 0, /* module index */ 161 0, /* module index */
161 &ngx_http_core_module_ctx, /* module context */
162 ngx_http_core_commands, /* module directives */ 162 ngx_http_core_commands, /* module directives */
163 NGX_HTTP_MODULE_TYPE, /* module type */ 163 NGX_HTTP_MODULE_TYPE, /* module type */
164 ngx_http_core_init /* init module */ 164 ngx_http_core_init /* init module */
165 }; 165 };
166 166
613 { 613 {
614 int i, j; 614 int i, j;
615 char *rv; 615 char *rv;
616 ngx_http_module_t *module; 616 ngx_http_module_t *module;
617 ngx_conf_t pcf; 617 ngx_conf_t pcf;
618 ngx_http_conf_ctx_t *ctx, *pctx; 618 ngx_http_conf_ctx_t *ctx, *tctx, *pctx;
619 ngx_http_core_srv_conf_t *scf; 619 ngx_http_core_srv_conf_t *scf;
620 ngx_http_core_loc_conf_t **plcf; 620 ngx_http_core_loc_conf_t **plcf;
621 621
622 ngx_test_null(ctx, 622 ngx_test_null(ctx,
623 ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t)), 623 ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t)),
624 NGX_CONF_ERROR); 624 NGX_CONF_ERROR);
625 625
626 /* server config */ 626 tctx = (ngx_http_conf_ctx_t *) cf->ctx;
627 ctx->main_conf = tctx->main_conf;
628
629 /* server configuration */
630
627 ngx_test_null(ctx->srv_conf, 631 ngx_test_null(ctx->srv_conf,
628 ngx_pcalloc(cf->pool, sizeof(void *) * ngx_http_max_module), 632 ngx_pcalloc(cf->pool, sizeof(void *) * ngx_http_max_module),
629 NGX_CONF_ERROR); 633 NGX_CONF_ERROR);
630 634
631 /* server location config */ 635 /* server location configuration */
636
632 ngx_test_null(ctx->loc_conf, 637 ngx_test_null(ctx->loc_conf,
633 ngx_pcalloc(cf->pool, sizeof(void *) * ngx_http_max_module), 638 ngx_pcalloc(cf->pool, sizeof(void *) * ngx_http_max_module),
634 NGX_CONF_ERROR); 639 NGX_CONF_ERROR);
635 640
636 for (i = 0; ngx_modules[i]; i++) { 641 for (i = 0; ngx_modules[i]; i++) {