Mercurial > hg > nginx
comparison src/http/modules/ngx_http_ssi_filter_module.c @ 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 | e444e8f6538b |
children | e9a0427f4139 |
comparison
equal
deleted
inserted
replaced
4373:f41b79fa95a3 | 4374:ae376a94de11 |
---|---|
622 } | 622 } |
623 | 623 |
624 continue; | 624 continue; |
625 } | 625 } |
626 | 626 |
627 if (cmd->conditional | |
628 && (ctx->conditional == 0 | |
629 || ctx->conditional > cmd->conditional)) | |
630 { | |
631 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | |
632 "invalid context of SSI command: \"%V\"", | |
633 &ctx->command); | |
634 goto ssi_error; | |
635 } | |
636 | |
637 if (!ctx->output && !cmd->block) { | 627 if (!ctx->output && !cmd->block) { |
638 | 628 |
639 if (ctx->block) { | 629 if (ctx->block) { |
640 | 630 |
641 /* reconstruct the SSI command text */ | 631 /* reconstruct the SSI command text */ |
705 } | 695 } |
706 | 696 |
707 if (cmd->conditional == 0) { | 697 if (cmd->conditional == 0) { |
708 continue; | 698 continue; |
709 } | 699 } |
700 } | |
701 | |
702 if (cmd->conditional | |
703 && (ctx->conditional == 0 | |
704 || ctx->conditional > cmd->conditional)) | |
705 { | |
706 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | |
707 "invalid context of SSI command: \"%V\"", | |
708 &ctx->command); | |
709 goto ssi_error; | |
710 } | 710 } |
711 | 711 |
712 if (ctx->params.nelts > NGX_HTTP_SSI_MAX_PARAMS) { | 712 if (ctx->params.nelts > NGX_HTTP_SSI_MAX_PARAMS) { |
713 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, | 713 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, |
714 "too many SSI command paramters: \"%V\"", | 714 "too many SSI command paramters: \"%V\"", |