diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c index 5343ca0be..549ae4ce2 100644 --- a/src/http/modules/ngx_http_ssi_filter_module.c +++ b/src/http/modules/ngx_http_ssi_filter_module.c @@ -800,8 +800,14 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in) } } - if (cmd->flush && ctx->out) { - rc = ngx_http_ssi_output(r, ctx); + if (cmd->flush) { + + if (ctx->out) { + rc = ngx_http_ssi_output(r, ctx); + + } else { + rc = ngx_http_next_body_filter(r, NULL); + } if (rc == NGX_ERROR) { return NGX_ERROR;