comparison src/http/modules/ngx_http_charset_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 a059e1aa65d4
children d7f606e25b99
comparison
equal deleted inserted replaced
109:a9bc21d63fe4 110:152567c11325
10 10
11 11
12 static void *ngx_http_charset_create_loc_conf(ngx_pool_t *pool); 12 static void *ngx_http_charset_create_loc_conf(ngx_pool_t *pool);
13 static char *ngx_http_charset_merge_loc_conf(ngx_pool_t *pool, 13 static char *ngx_http_charset_merge_loc_conf(ngx_pool_t *pool,
14 void *parent, void *child); 14 void *parent, void *child);
15 static int ngx_http_charset_filter_init(ngx_pool_t *pool); 15 static int ngx_http_charset_filter_init(ngx_cycle_t *cycle, ngx_log_t *log);
16 16
17 17
18 static ngx_command_t ngx_http_charset_filter_commands[] = { 18 static ngx_command_t ngx_http_charset_filter_commands[] = {
19 19
20 {ngx_string("default_charset"), 20 {ngx_string("default_charset"),
43 ngx_module_t ngx_http_charset_filter_module = { 43 ngx_module_t ngx_http_charset_filter_module = {
44 NGX_MODULE, 44 NGX_MODULE,
45 &ngx_http_charset_filter_module_ctx, /* module context */ 45 &ngx_http_charset_filter_module_ctx, /* module context */
46 ngx_http_charset_filter_commands, /* module directives */ 46 ngx_http_charset_filter_commands, /* module directives */
47 NGX_HTTP_MODULE, /* module type */ 47 NGX_HTTP_MODULE, /* module type */
48 ngx_http_charset_filter_init /* init module */ 48 ngx_http_charset_filter_init, /* init module */
49 NULL, /* commit module */
50 NULL /* rollback module */
49 }; 51 };
50 52
51 53
52 static int (*next_header_filter) (ngx_http_request_t *r); 54 static int (*next_header_filter) (ngx_http_request_t *r);
53 #if 0 55 #if 0
83 return next_body_filter(r, in); 85 return next_body_filter(r, in);
84 } 86 }
85 #endif 87 #endif
86 88
87 89
88 static int ngx_http_charset_filter_init(ngx_pool_t *pool) 90 static int ngx_http_charset_filter_init(ngx_cycle_t *cycle, ngx_log_t *log)
89 { 91 {
90 next_header_filter = ngx_http_top_header_filter; 92 next_header_filter = ngx_http_top_header_filter;
91 ngx_http_top_header_filter = ngx_http_charset_header_filter; 93 ngx_http_top_header_filter = ngx_http_charset_header_filter;
92 94
93 #if 0 95 #if 0