You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "GAWLAS,JULIUS (HP-Cupertino,ex1)" <ju...@hp.com> on 2002/05/24 00:07:20 UTC
[PATCH] For SSI include if statement with regexp
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;
Re: [PATCH] For SSI include if statement with regexp
Posted by Brian Pane <bp...@pacbell.net>.
GAWLAS,JULIUS (HP-Cupertino,ex1) wrote:
>It appears that SSI if statement with regular expressions is broken:
>
Committed, thanks!
--Brian