[hackers] [quark] use extended regex and fix example regex for realsies || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Sat, 22 Jul 2017 13:27:07 +0200 (CEST)

commit 2a5ab48294226cff51e050c8bc1bc798caa46891
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Sat Jul 22 12:32:08 2017 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
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
_AT_@ -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
_AT_@ -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);
                         }
Received on Sat Jul 22 2017 - 13:27:07 CEST

This archive was generated by hypermail 2.3.0 : Sat Jul 22 2017 - 13:37:44 CEST