]> git.kaiwu.me - nginx.git/commitdiff
if a subrequest was finished and SSI was in middle of SSI command parsing
authorIgor Sysoev <igor@sysoev.ru>
Sun, 17 Jun 2007 18:10:43 +0000 (18:10 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 17 Jun 2007 18:10:43 +0000 (18:10 +0000)
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.

src/http/modules/ngx_http_ssi_filter_module.c

index 5343ca0be60c93558029b0b0f63dbcf967e96ce6..549ae4ce2bc77a3977e993451fa881a45abd23a0 100644 (file)
@@ -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;