commit 2a5ab48294226cff51e050c8bc1bc798caa46891
parent 0fc6b0cccdcd3055e10aaea7469c740cbf021d84
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Jul 2017 12:32:08 +0200
use extended regex and fix example regex for realsies
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.def.h b/config.def.h
@@ -20,7 +20,7 @@ static struct {
regex_t re;
} vhost[] = {
/* canonical host host regex directory */
- { "example.org", "^(www\\.)?example.org$", "/example.org" },
+ { "example.org", "^(www\\.)?example\\.org$", "/example.org" },
};
/* mime-types */
diff --git a/quark.c b/quark.c
@@ -1010,7 +1010,7 @@ main(int argc, char *argv[])
if (vhosts) {
for (i = 0; i < LEN(vhost); i++) {
if (regcomp(&vhost[i].re, vhost[i].regex,
- REG_ICASE | REG_NOSUB)) {
+ REG_EXTENDED | REG_ICASE | REG_NOSUB)) {
die("%s: regcomp '%s': invalid regex\n", argv0,
vhost[i].regex);
}