Mercurial > hg > nginx-vendor-1-0
comparison src/http/modules/ngx_http_ssi_filter_module.c @ 230:38e7b94d63ac NGINX_0_4_0
nginx 0.4.0
*) Change in internal API: the HTTP modules initialization was moved
from the init module phase to the HTTP postconfiguration phase.
*) Change: now the request body is not read beforehand for the
ngx_http_perl_module: it's required to start the reading using the
$r->has_request_body method.
*) Feature: the ngx_http_perl_module supports the DECLINED return code.
*) Feature: the ngx_http_dav_module supports the incoming "Date" header
line for the PUT method.
*) Feature: the "ssi" directive is available inside the "if" block.
*) Bugfix: a segmentation fault occurred if there was an "index"
directive with variables and the first index name was without
variables; bug appeared in 0.1.29.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 30 Aug 2006 00:00:00 +0400 |
parents | fa32d59d9a15 |
children | c982febb7588 |
comparison
equal
deleted
inserted
replaced
229:1965c8e23be7 | 230:38e7b94d63ac |
---|---|
104 static void *ngx_http_ssi_create_main_conf(ngx_conf_t *cf); | 104 static void *ngx_http_ssi_create_main_conf(ngx_conf_t *cf); |
105 static char *ngx_http_ssi_init_main_conf(ngx_conf_t *cf, void *conf); | 105 static char *ngx_http_ssi_init_main_conf(ngx_conf_t *cf, void *conf); |
106 static void *ngx_http_ssi_create_conf(ngx_conf_t *cf); | 106 static void *ngx_http_ssi_create_conf(ngx_conf_t *cf); |
107 static char *ngx_http_ssi_merge_conf(ngx_conf_t *cf, | 107 static char *ngx_http_ssi_merge_conf(ngx_conf_t *cf, |
108 void *parent, void *child); | 108 void *parent, void *child); |
109 static ngx_int_t ngx_http_ssi_filter_init(ngx_cycle_t *cycle); | 109 static ngx_int_t ngx_http_ssi_filter_init(ngx_conf_t *cf); |
110 | 110 |
111 | 111 |
112 static ngx_command_t ngx_http_ssi_filter_commands[] = { | 112 static ngx_command_t ngx_http_ssi_filter_commands[] = { |
113 | 113 |
114 { ngx_string("ssi"), | 114 { ngx_string("ssi"), |
115 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | 115 NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF |
116 |NGX_CONF_FLAG, | |
116 ngx_conf_set_flag_slot, | 117 ngx_conf_set_flag_slot, |
117 NGX_HTTP_LOC_CONF_OFFSET, | 118 NGX_HTTP_LOC_CONF_OFFSET, |
118 offsetof(ngx_http_ssi_loc_conf_t, enable), | 119 offsetof(ngx_http_ssi_loc_conf_t, enable), |
119 NULL }, | 120 NULL }, |
120 | 121 |
158 | 159 |
159 | 160 |
160 | 161 |
161 static ngx_http_module_t ngx_http_ssi_filter_module_ctx = { | 162 static ngx_http_module_t ngx_http_ssi_filter_module_ctx = { |
162 ngx_http_ssi_preconfiguration, /* preconfiguration */ | 163 ngx_http_ssi_preconfiguration, /* preconfiguration */ |
163 NULL, /* postconfiguration */ | 164 ngx_http_ssi_filter_init, /* postconfiguration */ |
164 | 165 |
165 ngx_http_ssi_create_main_conf, /* create main configuration */ | 166 ngx_http_ssi_create_main_conf, /* create main configuration */ |
166 ngx_http_ssi_init_main_conf, /* init main configuration */ | 167 ngx_http_ssi_init_main_conf, /* init main configuration */ |
167 | 168 |
168 NULL, /* create server configuration */ | 169 NULL, /* create server configuration */ |
177 NGX_MODULE_V1, | 178 NGX_MODULE_V1, |
178 &ngx_http_ssi_filter_module_ctx, /* module context */ | 179 &ngx_http_ssi_filter_module_ctx, /* module context */ |
179 ngx_http_ssi_filter_commands, /* module directives */ | 180 ngx_http_ssi_filter_commands, /* module directives */ |
180 NGX_HTTP_MODULE, /* module type */ | 181 NGX_HTTP_MODULE, /* module type */ |
181 NULL, /* init master */ | 182 NULL, /* init master */ |
182 ngx_http_ssi_filter_init, /* init module */ | 183 NULL, /* init module */ |
183 NULL, /* init process */ | 184 NULL, /* init process */ |
184 NULL, /* init thread */ | 185 NULL, /* init thread */ |
185 NULL, /* exit thread */ | 186 NULL, /* exit thread */ |
186 NULL, /* exit process */ | 187 NULL, /* exit process */ |
187 NULL, /* exit master */ | 188 NULL, /* exit master */ |
2652 return NGX_CONF_OK; | 2653 return NGX_CONF_OK; |
2653 } | 2654 } |
2654 | 2655 |
2655 | 2656 |
2656 static ngx_int_t | 2657 static ngx_int_t |
2657 ngx_http_ssi_filter_init(ngx_cycle_t *cycle) | 2658 ngx_http_ssi_filter_init(ngx_conf_t *cf) |
2658 { | 2659 { |
2659 ngx_http_next_header_filter = ngx_http_top_header_filter; | 2660 ngx_http_next_header_filter = ngx_http_top_header_filter; |
2660 ngx_http_top_header_filter = ngx_http_ssi_header_filter; | 2661 ngx_http_top_header_filter = ngx_http_ssi_header_filter; |
2661 | 2662 |
2662 ngx_http_next_body_filter = ngx_http_top_body_filter; | 2663 ngx_http_next_body_filter = ngx_http_top_body_filter; |