comparison src/http/modules/ngx_http_chunked_filter.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 6dfda4cf5200
children d7f606e25b99
comparison
equal deleted inserted replaced
109:a9bc21d63fe4 110:152567c11325
2 #include <ngx_config.h> 2 #include <ngx_config.h>
3 #include <ngx_core.h> 3 #include <ngx_core.h>
4 #include <ngx_http.h> 4 #include <ngx_http.h>
5 5
6 6
7 static int ngx_http_chunked_filter_init(ngx_pool_t *pool); 7 static int ngx_http_chunked_filter_init(ngx_cycle_t *cycle, ngx_log_t *log);
8 8
9 9
10 static ngx_http_module_t ngx_http_chunked_filter_module_ctx = { 10 static ngx_http_module_t ngx_http_chunked_filter_module_ctx = {
11 NULL, /* create main configuration */ 11 NULL, /* create main configuration */
12 NULL, /* init main configuration */ 12 NULL, /* init main configuration */
22 ngx_module_t ngx_http_chunked_filter_module = { 22 ngx_module_t ngx_http_chunked_filter_module = {
23 NGX_MODULE, 23 NGX_MODULE,
24 &ngx_http_chunked_filter_module_ctx, /* module context */ 24 &ngx_http_chunked_filter_module_ctx, /* module context */
25 NULL, /* module directives */ 25 NULL, /* module directives */
26 NGX_HTTP_MODULE, /* module type */ 26 NGX_HTTP_MODULE, /* module type */
27 ngx_http_chunked_filter_init /* init module */ 27 ngx_http_chunked_filter_init, /* init module */
28 NULL, /* commit module */
29 NULL /* rollback module */
28 }; 30 };
29 31
30 32
31 static int (*next_header_filter) (ngx_http_request_t *r); 33 static int (*next_header_filter) (ngx_http_request_t *r);
32 static int (*next_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch); 34 static int (*next_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch);
115 117
116 return next_body_filter(r, out); 118 return next_body_filter(r, out);
117 } 119 }
118 120
119 121
120 static int ngx_http_chunked_filter_init(ngx_pool_t *pool) 122 static int ngx_http_chunked_filter_init(ngx_cycle_t *cycle, ngx_log_t *log)
121 { 123 {
122 next_header_filter = ngx_http_top_header_filter; 124 next_header_filter = ngx_http_top_header_filter;
123 ngx_http_top_header_filter = ngx_http_chunked_header_filter; 125 ngx_http_top_header_filter = ngx_http_chunked_header_filter;
124 126
125 next_body_filter = ngx_http_top_body_filter; 127 next_body_filter = ngx_http_top_body_filter;