comparison src/http/ngx_http_header_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
8 #include <ngx_table.h> 8 #include <ngx_table.h>
9 #include <ngx_hunk.h> 9 #include <ngx_hunk.h>
10 #include <ngx_conf_file.h> 10 #include <ngx_conf_file.h>
11 11
12 #include <ngx_http.h> 12 #include <ngx_http.h>
13 #include <ngx_http_config.h>
13 #include <ngx_http_write_filter.h> 14 #include <ngx_http_write_filter.h>
14 15
15 16
17 static void ngx_http_header_filter_init(ngx_pool_t *pool,
18 ngx_http_conf_filter_t *cf);
16 static int ngx_http_header_filter(ngx_http_request_t *r); 19 static int ngx_http_header_filter(ngx_http_request_t *r);
17 20
18 21
19 ngx_http_module_t ngx_http_header_filter_module_ctx = { 22 ngx_http_module_t ngx_http_header_filter_module_ctx = {
20 NGX_HTTP_MODULE,
21
22 NULL, /* create server config */ 23 NULL, /* create server config */
23 NULL, /* init server config */ 24 NULL, /* init server config */
25
24 NULL, /* create location config */ 26 NULL, /* create location config */
25 NULL, /* merge location config */ 27 NULL, /* merge location config */
26 28
27 NULL, /* translate handler */ 29 ngx_http_header_filter_init /* init filters */
28
29 ngx_http_header_filter, /* output header filter */
30 NULL, /* next output header filter */
31 NULL, /* output body filter */
32 NULL /* next output body filter */
33 }; 30 };
34 31
35 32
36 ngx_module_t ngx_http_header_filter_module = { 33 ngx_module_t ngx_http_header_filter_module = {
37 0, /* module index */ 34 0, /* module index */
293 ch->hunk = h; 290 ch->hunk = h;
294 ch->next = NULL; 291 ch->next = NULL;
295 292
296 return ngx_http_write_filter(r, ch); 293 return ngx_http_write_filter(r, ch);
297 } 294 }
295
296
297 static void ngx_http_header_filter_init(ngx_pool_t *pool,
298 ngx_http_conf_filter_t *cf)
299 {
300 cf->output_header_filter = ngx_http_header_filter;
301 }