mirror of
https://github.com/nginx/nginx.git
synced 2025-01-01 03:36:59 -06:00
SSI bugfix: the "if" command did not work inside the "block" command and
produced parsing errors.
This commit is contained in:
parent
8a85ab8e20
commit
c5968a998c
@ -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\"",
|
||||
|
Loading…
Reference in New Issue
Block a user