comparison src/http/ngx_http_write_filter.c @ 69:e43f406e4525

nginx-0.0.1-2003-03-20-19:09:44 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 20 Mar 2003 16:09:44 +0000
parents 5a7d1aaa1618
children 59229033ae93
comparison
equal deleted inserted replaced
68:d549fdc17d7e 69:e43f406e4525
14 14
15 15
16 static void *ngx_http_write_filter_create_conf(ngx_pool_t *pool); 16 static void *ngx_http_write_filter_create_conf(ngx_pool_t *pool);
17 static char *ngx_http_write_filter_merge_conf(ngx_pool_t *pool, 17 static char *ngx_http_write_filter_merge_conf(ngx_pool_t *pool,
18 void *parent, void *child); 18 void *parent, void *child);
19 static void ngx_http_write_filter_init(ngx_pool_t *pool,
20 ngx_http_conf_filter_t *cf);
19 21
20 22
21 static ngx_command_t ngx_http_write_filter_commands[] = { 23 static ngx_command_t ngx_http_write_filter_commands[] = {
22 24
23 {ngx_string("write_buffer"), 25 {ngx_string("write_buffer"),
29 {ngx_string(""), 0, NULL, 0, 0} 31 {ngx_string(""), 0, NULL, 0, 0}
30 }; 32 };
31 33
32 34
33 ngx_http_module_t ngx_http_write_filter_module_ctx = { 35 ngx_http_module_t ngx_http_write_filter_module_ctx = {
34 NGX_HTTP_MODULE,
35
36 NULL, /* create server config */ 36 NULL, /* create server config */
37 NULL, /* init server config */ 37 NULL, /* init server config */
38
38 ngx_http_write_filter_create_conf, /* create location config */ 39 ngx_http_write_filter_create_conf, /* create location config */
39 ngx_http_write_filter_merge_conf, /* merge location config */ 40 ngx_http_write_filter_merge_conf, /* merge location config */
40 41
41 NULL, /* translate handler */ 42 ngx_http_write_filter_init /* init filters */
42
43 NULL, /* output header filter */
44 NULL, /* next output header filter */
45 ngx_http_write_filter, /* output body filter */
46 NULL, /* next output body filter */
47 }; 43 };
48 44
49 45
50 ngx_module_t ngx_http_write_filter_module = { 46 ngx_module_t ngx_http_write_filter_module = {
51 0, /* module index */ 47 0, /* module index */
154 return NGX_AGAIN; 150 return NGX_AGAIN;
155 } 151 }
156 } 152 }
157 153
158 154
155 static void ngx_http_write_filter_init(ngx_pool_t *pool,
156 ngx_http_conf_filter_t *cf)
157 {
158 cf->output_body_filter = ngx_http_write_filter;
159 }
160
161
159 static void *ngx_http_write_filter_create_conf(ngx_pool_t *pool) 162 static void *ngx_http_write_filter_create_conf(ngx_pool_t *pool)
160 { 163 {
161 ngx_http_write_filter_conf_t *conf; 164 ngx_http_write_filter_conf_t *conf;
162 165
163 ngx_test_null(conf, 166 ngx_test_null(conf,