diff options
author | Valentin Bartenev <vbart@nginx.com> | 2011-12-19 13:28:22 +0000 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2011-12-19 13:28:22 +0000 |
commit | c5968a998c9b5cb0bec0b7d914832e43357d41cc (patch) | |
tree | 037ffa21bfb8f9e4568b4c13c7bd52f3c2fda704 /src | |
parent | 8a85ab8e2026bbe930dcb2482c739dc2a078a906 (diff) | |
download | nginx-c5968a998c9b5cb0bec0b7d914832e43357d41cc.tar.gz nginx-c5968a998c9b5cb0bec0b7d914832e43357d41cc.zip |
SSI bugfix: the "if" command did not work inside the "block" command and
produced parsing errors.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_ssi_filter_module.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c index 0b8bc9bf8..a6209dc01 100644 --- 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_request_t *r, ngx_chain_t *in) 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_request_t *r, ngx_chain_t *in) } } + 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\"", |