[nginx] svn commit: r4375 - trunk/src/http/modules

vbart at nginx.com vbart at nginx.com
Mon Dec 19 13:28:23 UTC 2011


Author: vbart
Date: 2011-12-19 13:28:22 +0000 (Mon, 19 Dec 2011)
New Revision: 4375

Modified:
   trunk/src/http/modules/ngx_http_ssi_filter_module.c
Log:
SSI bugfix: the "if" command did not work inside the "block" command and
produced parsing errors.


Modified: trunk/src/http/modules/ngx_http_ssi_filter_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_ssi_filter_module.c	2011-12-19 11:25:40 UTC (rev 4374)
+++ trunk/src/http/modules/ngx_http_ssi_filter_module.c	2011-12-19 13:28:22 UTC (rev 4375)
@@ -624,16 +624,6 @@
                     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 @@
                     }
                 }
 
+                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\"",



More information about the nginx-devel mailing list