# HG changeset patch # User Igor Sysoev # Date 1182103843 0 # Node ID 58691d40829f41e3595c2dff9195d8280b16e27f # Parent c3541b8973deda8046156dad2681db92c2137d15 if a subrequest was finished and SSI was in middle of SSI command parsing and the command was a fast subrequest then the second subrequest output was just after first subrequest output and response part of main request between the subrequests went after the second subrequest. diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c --- 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_reques } } - 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;