Mercurial > hg > nginx-ranges
comparison src/http/modules/ngx_http_addition_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 | 500a3242dff6 |
comparison
equal
deleted
inserted
replaced
229:1965c8e23be7 | 230:38e7b94d63ac |
---|---|
18 typedef struct { | 18 typedef struct { |
19 ngx_uint_t before_body_sent; | 19 ngx_uint_t before_body_sent; |
20 } ngx_http_addition_ctx_t; | 20 } ngx_http_addition_ctx_t; |
21 | 21 |
22 | 22 |
23 static ngx_int_t ngx_http_addition_filter_init(ngx_cycle_t *cycle); | |
24 static void *ngx_http_addition_create_conf(ngx_conf_t *cf); | 23 static void *ngx_http_addition_create_conf(ngx_conf_t *cf); |
25 static char *ngx_http_addition_merge_conf(ngx_conf_t *cf, void *parent, | 24 static char *ngx_http_addition_merge_conf(ngx_conf_t *cf, void *parent, |
26 void *child); | 25 void *child); |
26 static ngx_int_t ngx_http_addition_filter_init(ngx_conf_t *cf); | |
27 | 27 |
28 | 28 |
29 static ngx_command_t ngx_http_addition_commands[] = { | 29 static ngx_command_t ngx_http_addition_commands[] = { |
30 | 30 |
31 { ngx_string("add_before_body"), | 31 { ngx_string("add_before_body"), |
46 }; | 46 }; |
47 | 47 |
48 | 48 |
49 static ngx_http_module_t ngx_http_addition_filter_module_ctx = { | 49 static ngx_http_module_t ngx_http_addition_filter_module_ctx = { |
50 NULL, /* preconfiguration */ | 50 NULL, /* preconfiguration */ |
51 NULL, /* postconfiguration */ | 51 ngx_http_addition_filter_init, /* postconfiguration */ |
52 | 52 |
53 NULL, /* create main configuration */ | 53 NULL, /* create main configuration */ |
54 NULL, /* init main configuration */ | 54 NULL, /* init main configuration */ |
55 | 55 |
56 NULL, /* create server configuration */ | 56 NULL, /* create server configuration */ |
65 NGX_MODULE_V1, | 65 NGX_MODULE_V1, |
66 &ngx_http_addition_filter_module_ctx, /* module context */ | 66 &ngx_http_addition_filter_module_ctx, /* module context */ |
67 ngx_http_addition_commands, /* module directives */ | 67 ngx_http_addition_commands, /* module directives */ |
68 NGX_HTTP_MODULE, /* module type */ | 68 NGX_HTTP_MODULE, /* module type */ |
69 NULL, /* init master */ | 69 NULL, /* init master */ |
70 ngx_http_addition_filter_init, /* init module */ | 70 NULL, /* init module */ |
71 NULL, /* init process */ | 71 NULL, /* init process */ |
72 NULL, /* init thread */ | 72 NULL, /* init thread */ |
73 NULL, /* exit thread */ | 73 NULL, /* exit thread */ |
74 NULL, /* exit process */ | 74 NULL, /* exit process */ |
75 NULL, /* exit master */ | 75 NULL, /* exit master */ |
176 return ngx_http_send_special(r, NGX_HTTP_LAST); | 176 return ngx_http_send_special(r, NGX_HTTP_LAST); |
177 } | 177 } |
178 | 178 |
179 | 179 |
180 static ngx_int_t | 180 static ngx_int_t |
181 ngx_http_addition_filter_init(ngx_cycle_t *cycle) | 181 ngx_http_addition_filter_init(ngx_conf_t *cf) |
182 { | 182 { |
183 ngx_http_next_header_filter = ngx_http_top_header_filter; | 183 ngx_http_next_header_filter = ngx_http_top_header_filter; |
184 ngx_http_top_header_filter = ngx_http_addition_header_filter; | 184 ngx_http_top_header_filter = ngx_http_addition_header_filter; |
185 | 185 |
186 ngx_http_next_body_filter = ngx_http_top_body_filter; | 186 ngx_http_next_body_filter = ngx_http_top_body_filter; |