changeset 846:c2cae54f2045

fix add_before_body without add_after_body
author Igor Sysoev <igor@sysoev.ru>
date Tue, 14 Nov 2006 13:15:08 +0000
parents eb5cf273e5d2
children 979045fdcbd2
files src/http/modules/ngx_http_addition_filter_module.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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_r
         }
     }
 
+    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) {