comparison src/http/modules/ngx_http_charset_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 cd54bcbaf3b5
comparison
equal deleted inserted replaced
112:da763a85be66 113:d7f606e25b99
7 typedef struct { 7 typedef struct {
8 ngx_str_t default_charset; 8 ngx_str_t default_charset;
9 } ngx_http_charset_loc_conf_t; 9 } ngx_http_charset_loc_conf_t;
10 10
11 11
12 static int ngx_http_charset_filter_init(ngx_cycle_t *cycle);
12 static void *ngx_http_charset_create_loc_conf(ngx_pool_t *pool); 13 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, 14 static char *ngx_http_charset_merge_loc_conf(ngx_pool_t *pool,
14 void *parent, void *child); 15 void *parent, void *child);
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"),
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 */ 49 NULL /* init child */
50 NULL /* rollback module */
51 }; 50 };
52 51
53 52
54 static int (*next_header_filter) (ngx_http_request_t *r); 53 static int (*next_header_filter) (ngx_http_request_t *r);
55 #if 0 54 #if 0
85 return next_body_filter(r, in); 84 return next_body_filter(r, in);
86 } 85 }
87 #endif 86 #endif
88 87
89 88
90 static int ngx_http_charset_filter_init(ngx_cycle_t *cycle, ngx_log_t *log) 89 static int ngx_http_charset_filter_init(ngx_cycle_t *cycle)
91 { 90 {
92 next_header_filter = ngx_http_top_header_filter; 91 next_header_filter = ngx_http_top_header_filter;
93 ngx_http_top_header_filter = ngx_http_charset_header_filter; 92 ngx_http_top_header_filter = ngx_http_charset_header_filter;
94 93
95 #if 0 94 #if 0