comparison src/http/ngx_http_config.c @ 26:53cb81681040

nginx-0.0.1-2002-12-15-09:25:09 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 15 Dec 2002 06:25:09 +0000
parents 77c7629a2627
children c2d9ef3ebb6d
comparison
equal deleted inserted replaced
25:a8b156554dfe 26:53cb81681040
6 #include <ngx_http_output_filter.h> 6 #include <ngx_http_output_filter.h>
7 #include <ngx_http_index_handler.h> 7 #include <ngx_http_index_handler.h>
8 8
9 9
10 int ngx_max_module; 10 int ngx_max_module;
11
12 int (*ngx_http_top_header_filter) (ngx_http_request_t *r);
11 13
12 /* STUB: gobal srv and loc conf */ 14 /* STUB: gobal srv and loc conf */
13 void **ngx_srv_conf; 15 void **ngx_srv_conf;
14 void **ngx_loc_conf; 16 void **ngx_loc_conf;
15 17
51 } 53 }
52 54
53 int ngx_http_init_filters(ngx_pool_t *pool, ngx_http_module_t **modules) 55 int ngx_http_init_filters(ngx_pool_t *pool, ngx_http_module_t **modules)
54 { 56 {
55 int i; 57 int i;
56 int (*filter)(ngx_http_request_t *r, ngx_chain_t *ch); 58 int (*ohf)(ngx_http_request_t *r);
59 int (*obf)(ngx_http_request_t *r, ngx_chain_t *ch);
57 60
58 filter = ngx_http_write_filter; 61 ohf = NULL;
59 62
60 for (i = 0; modules[i]; i++) { 63 for (i = 0; modules[i]; i++) {
61 if (modules[i]->init_output_body_filter) 64 if (modules[i]->output_header_filter) {
62 modules[i]->init_output_body_filter(&filter); 65 modules[i]->next_output_header_filter = ohf;
66 ohf = modules[i]->output_header_filter;
67 }
68 }
69
70 ngx_http_top_header_filter = ohf;
71
72 obf = NULL;
73
74 for (i = 0; modules[i]; i++) {
75 if (modules[i]->output_body_filter) {
76 modules[i]->next_output_body_filter = obf;
77 obf = modules[i]->output_body_filter;
78 }
63 } 79 }
64 } 80 }
65 81
66 82
67 /* STUB */ 83 /* STUB */