use extended regex and fix example regex for realsies
This commit is contained in:
parent
0fc6b0cccd
commit
2a5ab48294
2 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ static struct {
|
||||||
regex_t re;
|
regex_t re;
|
||||||
} vhost[] = {
|
} vhost[] = {
|
||||||
/* canonical host host regex directory */
|
/* canonical host host regex directory */
|
||||||
{ "example.org", "^(www\\.)?example.org$", "/example.org" },
|
{ "example.org", "^(www\\.)?example\\.org$", "/example.org" },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* mime-types */
|
/* mime-types */
|
||||||
|
|
2
quark.c
2
quark.c
|
@ -1010,7 +1010,7 @@ main(int argc, char *argv[])
|
||||||
if (vhosts) {
|
if (vhosts) {
|
||||||
for (i = 0; i < LEN(vhost); i++) {
|
for (i = 0; i < LEN(vhost); i++) {
|
||||||
if (regcomp(&vhost[i].re, vhost[i].regex,
|
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,
|
die("%s: regcomp '%s': invalid regex\n", argv0,
|
||||||
vhost[i].regex);
|
vhost[i].regex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue