Mercurial > hg > nginx-quic
comparison src/http/ngx_http_core_module.c @ 110:152567c11325
nginx-0.0.1-2003-07-02-22:51:41 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 02 Jul 2003 18:51:41 +0000 |
parents | a9bc21d63fe4 |
children | d7f606e25b99 |
comparison
equal
deleted
inserted
replaced
109:a9bc21d63fe4 | 110:152567c11325 |
---|---|
420 } | 420 } |
421 | 421 |
422 | 422 |
423 static int ngx_http_core_index_handler(ngx_http_request_t *r) | 423 static int ngx_http_core_index_handler(ngx_http_request_t *r) |
424 { | 424 { |
425 int i, rc; | 425 int i, rc; |
426 ngx_http_handler_pt *h; | 426 ngx_http_handler_pt *h; |
427 | 427 ngx_http_core_main_conf_t *cmcf; |
428 h = (ngx_http_handler_pt *) ngx_http_index_handlers.elts; | 428 |
429 for (i = ngx_http_index_handlers.nelts; i > 0; /* void */) { | 429 cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module); |
430 | |
431 h = cmcf->index_handlers.elts; | |
432 for (i = cmcf->index_handlers.nelts; i > 0; /* void */) { | |
430 rc = h[--i](r); | 433 rc = h[--i](r); |
431 | 434 |
432 if (rc != NGX_DECLINED) { | 435 if (rc != NGX_DECLINED) { |
433 | 436 |
434 if (rc == NGX_HTTP_NOT_FOUND) { | 437 if (rc == NGX_HTTP_NOT_FOUND) { |
526 } | 529 } |
527 | 530 |
528 | 531 |
529 static int ngx_http_core_init(ngx_cycle_t *cycle, ngx_log_t *log) | 532 static int ngx_http_core_init(ngx_cycle_t *cycle, ngx_log_t *log) |
530 { | 533 { |
531 ngx_http_handler_pt *h; | 534 ngx_http_handler_pt *h; |
532 | 535 ngx_http_conf_ctx_t *ctx; |
533 ngx_test_null(h, ngx_push_array(&ngx_http_translate_handlers), NGX_ERROR); | 536 ngx_http_core_main_conf_t *cmcf; |
537 | |
538 ctx = (ngx_http_conf_ctx_t *) cycle->conf_ctx[ngx_http_module.index]; | |
539 cmcf = ctx->main_conf[ngx_http_core_module.ctx_index]; | |
540 | |
541 ngx_test_null(h, ngx_push_array(&cmcf->translate_handlers), NGX_ERROR); | |
534 | 542 |
535 *h = ngx_http_core_translate_handler; | 543 *h = ngx_http_core_translate_handler; |
536 | 544 |
537 return NGX_OK; | 545 return NGX_OK; |
538 } | 546 } |