This appeared while playing around with BrowserMatchNoCase.

The patternmatch "optimizer" forgets the icase flag for non-regex pattern, 
so you get the strange behaviour that

BrowserMatchNoCase win ...

doesn't work, but

BrowserMatchNoCase (win) ...

does ;-) The attached patch fixes this.

nd
-- 
"Eine Eieruhr", erkl�rt ihr Hermann, "besteht aus einem Ei. Du nimmst
das Ei und kochst es. Wenn es hart ist, sind f�nf Minuten um. Dann wei�t
du, da� die Zeit vergangen ist."
                             -- Hannes H�ttner in "Das Blaue vom Himmel"
Index: modules/metadata/mod_setenvif.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/metadata/mod_setenvif.c,v
retrieving revision 1.38
diff -u -r1.38 mod_setenvif.c
--- modules/metadata/mod_setenvif.c     12 Nov 2002 18:30:00 -0000      1.38
+++ modules/metadata/mod_setenvif.c     26 Nov 2002 14:36:53 -0000
@@ -342,7 +342,7 @@
         new->icase = icase;
         if ((simple_pattern = non_regex_pattern(cmd->pool, regex))) {
             new->pattern = apr_strmatch_precompile(cmd->pool,
-                                                   simple_pattern, 1);
+                                                   simple_pattern, !icase);
             if (new->pattern == NULL) {
                 return apr_pstrcat(cmd->pool, cmd->cmd->name,
                                    " pattern could not be compiled.", NULL);

Reply via email to