It appears that SSI if statement with regular expressions is broken:

try to serve something like that:

<!--#set var="v" value="12:34" -->

<!--#if expr=" ${v} = /.*:.*/ " -->
TRUE
<!--#else -->
FALSE
<!--#endif -->

you get: "[an error occurred while processing this directive] "

Maybe I am missing something obvious but this error apprears to be in
mod_include get_ptoken function; after getting the string inside // we don't
move passed the closing / and return / instead. Attached patch attepmts to
fix it.

Julius Gawlas

Index: mod_include.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/filters/mod_include.c,v
retrieving revision 1.222
diff -u -r1.222 mod_include.c
--- mod_include.c       17 May 2002 11:33:09 -0000      1.222
+++ mod_include.c       23 May 2002 21:56:52 -0000
@@ -1890,6 +1890,8 @@
                 if (ch == qs) {
                     qs = 0;
                     tkn_fnd = 1;
+                                       /* move passed qs */
+                                       ++string;
                 }
                 else {
                     token->value[next++] = ch;

Reply via email to