From 2a5ab48294226cff51e050c8bc1bc798caa46891 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 22 Jul 2017 12:32:08 +0200 Subject: [PATCH] use extended regex and fix example regex for realsies --- config.def.h | 2 +- quark.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); }