Mercurial > hg > nginx
diff src/http/modules/ngx_http_addition_filter_module.c @ 777:4ab852b691f5
<!--#include virtual=... set=... -->
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 13 Oct 2006 15:20:10 +0000 |
parents | 86bb73dc8d40 |
children | c2cae54f2045 |
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 @@ -144,10 +144,10 @@ ngx_http_addition_body_filter(ngx_http_r ctx->before_body_sent = 1; if (conf->before_body.len) { - if (ngx_http_subrequest(r, &conf->before_body, NULL, &sr, NULL, 0) - == NGX_ERROR) - { - return NGX_ERROR; + rc = ngx_http_subrequest(r, &conf->before_body, NULL, &sr, NULL, 0); + + if (rc == NGX_ERROR || rc == NGX_DONE) { + return rc; } } } @@ -168,10 +168,10 @@ ngx_http_addition_body_filter(ngx_http_r return rc; } - if (ngx_http_subrequest(r, &conf->after_body, NULL, &sr, NULL, 0) - == NGX_ERROR) - { - return NGX_ERROR; + rc = ngx_http_subrequest(r, &conf->after_body, NULL, &sr, NULL, 0); + + if (rc == NGX_ERROR || rc == NGX_DONE) { + return rc; } ngx_http_set_ctx(r, NULL, ngx_http_addition_filter_module);