Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: не срабатывает if в SSI
On Sun, 30 Oct 2005, Vladimir Tananko wrote:
При обработке следующей конструкции nginx 0.3.5 (FreeBSD i386 5.4)
--- cut here ---
<html><body>
<!--#if expr="\"$QUERY_STRING\"=\"\"" -->
<!--#include virtual="file1.inc"-->
<!--#else -->
<!--#include virtual="file2.inc"-->
<!--#endif -->
</body></html>
--- cut here ---
на выходе получаем
--- cut here ---
[an error occurred while processing the directive]
FILE1
--- cut here ---
file1.inc содержит строку "FILE1"
В апаче данное условие обрабатывается нормально.
Патч.
Игорь Сысоев
http://sysoev.ru --- src/http/modules/ngx_http_ssi_filter_module.c Sat Oct 22 20:39:31 2005
+++ src/http/modules/ngx_http_ssi_filter_module.c Sun Oct 30 14:31:48 2005
@@ -1200,10 +1202,12 @@
}
if (ch == '"' && state == ssi_double_quoted_value_state) {
+ ctx->param->value.data[ctx->param->value.len - 1] = ch;
break;
}
if (ch == '\'' && state == ssi_quoted_value_state) {
+ ctx->param->value.data[ctx->param->value.len - 1] = ch;
break;
}
@@ -1817,7 +1821,8 @@
if ((*p >= 'a' && *p <= 'z')
|| (*p >= '0' && *p <= '9')
- || *p == '$' || *p == '{' || *p == '}' || *p == '_')
+ || *p == '$' || *p == '{' || *p == '}' || *p == '_'
+ || *p == '"' || *p == '\'')
{
continue;
}
|