]> git.kaiwu.me - nginx.git/commitdiff
fix add_before_body without add_after_body
authorIgor Sysoev <igor@sysoev.ru>
Tue, 14 Nov 2006 13:15:08 +0000 (13:15 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 14 Nov 2006 13:15:08 +0000 (13:15 +0000)
src/http/modules/ngx_http_addition_filter_module.c

index 26517147c2709533a72fb377e6c43b4c1c271596..c05aefde495713ea87fadc6c0bd939591bf887f9 100644 (file)
@@ -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) {