Commit 79833e5a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make regular expressions case insensitive.

This is not optimal, but a better compromise than the alternative.

DNS names are case insensitive, but URLs are not.

However, URLs are very often filenames and having files which differ
only in case is already asking for trouble.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1956 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 690a346c
......@@ -62,7 +62,7 @@ AddBan(const char *regexp, int hash)
b = calloc(sizeof *b, 1);
XXXAN(b);
i = regcomp(&b->regexp, regexp, REG_EXTENDED | REG_NOSUB);
i = regcomp(&b->regexp, regexp, REG_EXTENDED | REG_ICASE | REG_NOSUB);
if (i) {
char buf[512];
......
......@@ -53,7 +53,7 @@ VRT_re_init(void **rep, const char *re, int sub)
t = calloc(sizeof *t, 1);
XXXAN(t);
/* This was already check-compiled by the VCL compiler */
AZ(regcomp(t, re, REG_EXTENDED | (sub ? 0 : REG_NOSUB)));
AZ(regcomp(t, re, REG_EXTENDED | REG_ICASE | (sub ? 0 : REG_NOSUB)));
*rep = t;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment