comparison src/http/modules/ngx_http_chunked_filter.c @ 113:d7f606e25b99

nginx-0.0.1-2003-07-04-19:10:33 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 04 Jul 2003 15:10:33 +0000
parents 152567c11325
children e29909bd9b8a
comparison
equal deleted inserted replaced
112:da763a85be66 113:d7f606e25b99
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_cycle_t *cycle, ngx_log_t *log); 7 static int ngx_http_chunked_filter_init(ngx_cycle_t *cycle);
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 */
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 */ 28 NULL /* init child */
29 NULL /* rollback module */
30 }; 29 };
31 30
32 31
33 static int (*next_header_filter) (ngx_http_request_t *r); 32 static int (*next_header_filter) (ngx_http_request_t *r);
34 static int (*next_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch); 33 static int (*next_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch);
117 116
118 return next_body_filter(r, out); 117 return next_body_filter(r, out);
119 } 118 }
120 119
121 120
122 static int ngx_http_chunked_filter_init(ngx_cycle_t *cycle, ngx_log_t *log) 121 static int ngx_http_chunked_filter_init(ngx_cycle_t *cycle)
123 { 122 {
124 next_header_filter = ngx_http_top_header_filter; 123 next_header_filter = ngx_http_top_header_filter;
125 ngx_http_top_header_filter = ngx_http_chunked_header_filter; 124 ngx_http_top_header_filter = ngx_http_chunked_header_filter;
126 125
127 next_body_filter = ngx_http_top_body_filter; 126 next_body_filter = ngx_http_top_body_filter;