From ae5db1d400b64da9d7a47b65b0af43688571f22f Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 14 Nov 2006 13:15:08 +0000 Subject: [PATCH] fix add_before_body without add_after_body --- src/http/modules/ngx_http_addition_filter_module.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/http/modules/ngx_http_addition_filter_module.c b/src/http/modules/ngx_http_addition_filter_module.c index 26517147c..c05aefde4 100644 --- a/src/http/modules/ngx_http_addition_filter_module.c +++ b/src/http/modules/ngx_http_addition_filter_module.c @@ -152,6 +152,11 @@ ngx_http_addition_body_filter(ngx_http_request_t *r, ngx_chain_t *in) } } + if (conf->after_body.len == 0) { + ngx_http_set_ctx(r, NULL, ngx_http_addition_filter_module); + return ngx_http_next_body_filter(r, in); + } + last = 0; for (cl = in; cl; cl = cl->next) {