comparison src/http/ngx_http_copy_filter_module.c @ 681:7e24168b0853 release-0.4.0

nginx-0.4.0-RELEASE import *) 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; the bug had appeared in 0.1.29.
author Igor Sysoev <igor@sysoev.ru>
date Wed, 30 Aug 2006 10:39:17 +0000
parents 63a820b0bc6c
children 362d156f0278
comparison
equal deleted inserted replaced
680:63a949f7ed4f 681:7e24168b0853
15 15
16 16
17 static void *ngx_http_copy_filter_create_conf(ngx_conf_t *cf); 17 static void *ngx_http_copy_filter_create_conf(ngx_conf_t *cf);
18 static char *ngx_http_copy_filter_merge_conf(ngx_conf_t *cf, 18 static char *ngx_http_copy_filter_merge_conf(ngx_conf_t *cf,
19 void *parent, void *child); 19 void *parent, void *child);
20 static ngx_int_t ngx_http_copy_filter_init(ngx_cycle_t *cycle); 20 static ngx_int_t ngx_http_copy_filter_init(ngx_conf_t *cf);
21 21
22 22
23 static ngx_command_t ngx_http_copy_filter_commands[] = { 23 static ngx_command_t ngx_http_copy_filter_commands[] = {
24 24
25 { ngx_string("output_buffers"), 25 { ngx_string("output_buffers"),
33 }; 33 };
34 34
35 35
36 static ngx_http_module_t ngx_http_copy_filter_module_ctx = { 36 static ngx_http_module_t ngx_http_copy_filter_module_ctx = {
37 NULL, /* preconfiguration */ 37 NULL, /* preconfiguration */
38 NULL, /* postconfiguration */ 38 ngx_http_copy_filter_init, /* postconfiguration */
39 39
40 NULL, /* create main configuration */ 40 NULL, /* create main configuration */
41 NULL, /* init main configuration */ 41 NULL, /* init main configuration */
42 42
43 NULL, /* create server configuration */ 43 NULL, /* create server configuration */
52 NGX_MODULE_V1, 52 NGX_MODULE_V1,
53 &ngx_http_copy_filter_module_ctx, /* module context */ 53 &ngx_http_copy_filter_module_ctx, /* module context */
54 ngx_http_copy_filter_commands, /* module directives */ 54 ngx_http_copy_filter_commands, /* module directives */
55 NGX_HTTP_MODULE, /* module type */ 55 NGX_HTTP_MODULE, /* module type */
56 NULL, /* init master */ 56 NULL, /* init master */
57 ngx_http_copy_filter_init, /* init module */ 57 NULL, /* init module */
58 NULL, /* init process */ 58 NULL, /* init process */
59 NULL, /* init thread */ 59 NULL, /* init thread */
60 NULL, /* exit thread */ 60 NULL, /* exit thread */
61 NULL, /* exit process */ 61 NULL, /* exit process */
62 NULL, /* exit master */ 62 NULL, /* exit master */
147 return NULL; 147 return NULL;
148 } 148 }
149 149
150 150
151 static ngx_int_t 151 static ngx_int_t
152 ngx_http_copy_filter_init(ngx_cycle_t *cycle) 152 ngx_http_copy_filter_init(ngx_conf_t *cf)
153 { 153 {
154 ngx_http_next_filter = ngx_http_top_body_filter; 154 ngx_http_next_filter = ngx_http_top_body_filter;
155 ngx_http_top_body_filter = ngx_http_copy_filter; 155 ngx_http_top_body_filter = ngx_http_copy_filter;
156 156
157 return NGX_OK; 157 return NGX_OK;