aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-10-11 14:33:38 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-10-11 14:33:38 +0000
commit84b7f5ba0da5cada026209adb437cab4d675ba5b (patch)
treede669d7d4d983ada31b631adf7d779ac85f069e6 /src
parent35d5272e3a9ac165aaee9e354312b88f8fcbc13d (diff)
downloadnginx-84b7f5ba0da5cada026209adb437cab4d675ba5b.tar.gz
nginx-84b7f5ba0da5cada026209adb437cab4d675ba5b.zip
fix <!--#include virtual=... wait="yes" -->
r766 did not fix the bug too
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_ssi_filter_module.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c
index 5e7bc1eb1..21bd81946 100644
--- a/src/http/modules/ngx_http_ssi_filter_module.c
+++ b/src/http/modules/ngx_http_ssi_filter_module.c
@@ -383,6 +383,7 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
ngx_chain_t *cl, **ll;
ngx_table_elt_t *param;
ngx_connection_t *c;
+ ngx_http_request_t *pr;
ngx_http_ssi_ctx_t *ctx, *mctx;
ngx_http_ssi_block_t *bl;
ngx_http_ssi_param_t *prm;
@@ -411,16 +412,34 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
}
if (ctx->wait) {
- if (ctx->wait != r) {
+ if (r->connection->data != r) {
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http ssi filter \"%V\" wait", &r->uri);
return NGX_AGAIN;
}
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "http ssi filter \"%V\" continue", &r->uri);
+ for (pr = ctx->wait->parent; pr; pr = pr->parent) {
+ if (pr == r) {
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http ssi filter \"%V\" flush", &r->uri);
- ctx->wait = NULL;
+ rc = ngx_http_next_body_filter(r, NULL);
+
+ if (ctx->wait->done) {
+ ctx->wait = NULL;
+ }
+
+ if (rc == NGX_ERROR || rc == NGX_AGAIN) {
+ return rc;
+ }
+ }
+ }
+
+ if (ctx->wait == r) {
+ ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http ssi filter \"%V\" continue", &r->uri);
+ ctx->wait = NULL;
+ }
}
slcf = ngx_http_get_module_loc_conf(r, ngx_http_ssi_filter_module);