Mercurial > hg > nginx-vendor-0-7
diff src/http/modules/ngx_http_gzip_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 | 56688ed172c8 |
children | 0effe91f6083 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_gzip_filter_module.c +++ b/src/http/modules/ngx_http_gzip_filter_module.c @@ -83,7 +83,7 @@ static ngx_int_t ngx_http_gzip_add_varia static ngx_int_t ngx_http_gzip_ratio_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, uintptr_t data); -static ngx_int_t ngx_http_gzip_filter_init(ngx_cycle_t *cycle); +static ngx_int_t ngx_http_gzip_filter_init(ngx_conf_t *cf); static void *ngx_http_gzip_create_conf(ngx_conf_t *cf); static char *ngx_http_gzip_merge_conf(ngx_conf_t *cf, void *parent, void *child); @@ -201,7 +201,7 @@ static ngx_command_t ngx_http_gzip_filt static ngx_http_module_t ngx_http_gzip_filter_module_ctx = { ngx_http_gzip_add_variables, /* preconfiguration */ - NULL, /* postconfiguration */ + ngx_http_gzip_filter_init, /* postconfiguration */ NULL, /* create main configuration */ NULL, /* init main configuration */ @@ -220,7 +220,7 @@ ngx_module_t ngx_http_gzip_filter_modul ngx_http_gzip_filter_commands, /* module directives */ NGX_HTTP_MODULE, /* module type */ NULL, /* init master */ - ngx_http_gzip_filter_init, /* init module */ + NULL, /* init module */ NULL, /* init process */ NULL, /* init thread */ NULL, /* exit thread */ @@ -1030,19 +1030,6 @@ ngx_http_gzip_ratio_variable(ngx_http_re } -static ngx_int_t -ngx_http_gzip_filter_init(ngx_cycle_t *cycle) -{ - ngx_http_next_header_filter = ngx_http_top_header_filter; - ngx_http_top_header_filter = ngx_http_gzip_header_filter; - - ngx_http_next_body_filter = ngx_http_top_body_filter; - ngx_http_top_body_filter = ngx_http_gzip_body_filter; - - return NGX_OK; -} - - static void * ngx_http_gzip_create_conf(ngx_conf_t *cf) { @@ -1123,6 +1110,19 @@ ngx_http_gzip_merge_conf(ngx_conf_t *cf, } +static ngx_int_t +ngx_http_gzip_filter_init(ngx_conf_t *cf) +{ + ngx_http_next_header_filter = ngx_http_top_header_filter; + ngx_http_top_header_filter = ngx_http_gzip_header_filter; + + ngx_http_next_body_filter = ngx_http_top_body_filter; + ngx_http_top_body_filter = ngx_http_gzip_body_filter; + + return NGX_OK; +} + + static char * ngx_http_gzip_types(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) {