aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-07-07 10:17:19 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-07-07 10:17:19 +0000
commit7aa1f5bf4a8ebbdd884fbb4fb8501e48de53815e (patch)
treec7a818be68cde6e154f1acf4bf73bd093ada16a4 /src
parenta2e846242ff88ecd6ebc00d2f8917b30d95d2ded (diff)
downloadnginx-7aa1f5bf4a8ebbdd884fbb4fb8501e48de53815e.tar.gz
nginx-7aa1f5bf4a8ebbdd884fbb4fb8501e48de53815e.zip
update r->buffered after processing SSI command,
the bug has been probably introduced in r2378
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_ssi_filter_module.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c
index 45626c6b0..994efc40c 100644
--- a/src/http/modules/ngx_http_ssi_filter_module.c
+++ b/src/http/modules/ngx_http_ssi_filter_module.c
@@ -70,6 +70,8 @@ typedef enum {
static ngx_int_t ngx_http_ssi_output(ngx_http_request_t *r,
ngx_http_ssi_ctx_t *ctx);
+static void ngx_http_ssi_buffered(ngx_http_request_t *r,
+ ngx_http_ssi_ctx_t *ctx);
static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
ngx_http_ssi_ctx_t *ctx);
static ngx_str_t *ngx_http_ssi_get_variable(ngx_http_request_t *r,
@@ -793,6 +795,7 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
}
if (rc == NGX_DONE || rc == NGX_AGAIN || rc == NGX_ERROR) {
+ ngx_http_ssi_buffered(r, ctx);
return rc;
}
}
@@ -945,14 +948,21 @@ ngx_http_ssi_output(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx)
}
}
+ ngx_http_ssi_buffered(r, ctx);
+
+ return rc;
+}
+
+
+static void
+ngx_http_ssi_buffered(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx)
+{
if (ctx->in || ctx->buf) {
r->buffered |= NGX_HTTP_SSI_BUFFERED;
} else {
r->buffered &= ~NGX_HTTP_SSI_BUFFERED;
}
-
- return rc;
}