commit 2a5ab48294226cff51e050c8bc1bc798caa46891
Author: Hiltjo Posthuma <[email protected]>
AuthorDate: Sat Jul 22 12:32:08 2017 +0200
Commit: Laslo Hunhold <[email protected]>
CommitDate: Sat Jul 22 13:23:10 2017 +0200
use extended regex and fix example regex for realsies
diff --git a/config.def.h b/config.def.h
index 0a020ee..5956647 100644
--- 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
index fd5f36b..f2014c2 100644
--- 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);
}