Mercurial > hg > nginx
changeset 4374:ae376a94de11
SSI bugfix: the "if" command did not work inside the "block" command and
produced parsing errors.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 19 Dec 2011 13:28:22 +0000 |
parents | f41b79fa95a3 |
children | f31146f282fd |
files | src/http/modules/ngx_http_ssi_filter_module.c |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_ssi_filter_module.c +++ b/src/http/modules/ngx_http_ssi_filter_module.c @@ -624,16 +624,6 @@ ngx_http_ssi_body_filter(ngx_http_reques continue; } - if (cmd->conditional - && (ctx->conditional == 0 - || ctx->conditional > cmd->conditional)) - { - ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, - "invalid context of SSI command: \"%V\"", - &ctx->command); - goto ssi_error; - } - if (!ctx->output && !cmd->block) { if (ctx->block) { @@ -709,6 +699,16 @@ ngx_http_ssi_body_filter(ngx_http_reques } } + if (cmd->conditional + && (ctx->conditional == 0 + || ctx->conditional > cmd->conditional)) + { + ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, + "invalid context of SSI command: \"%V\"", + &ctx->command); + goto ssi_error; + } + if (ctx->params.nelts > NGX_HTTP_SSI_MAX_PARAMS) { ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "too many SSI command paramters: \"%V\"",