aboutsummaryrefslogtreecommitdiff
path: root/gmid.h
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-01-30 12:04:20 +0000
committerOmar Polo <op@omarpolo.com>2021-01-30 12:04:20 +0000
commit6016a593a32c4f3f27ed3e7892a1595d631fcbef (patch)
treeefbf517aa47a564c87138c55e09404bc17d909d8 /gmid.h
parent601bc1cc3797c8afc6610478cab9004be7a2c7b0 (diff)
invert the location precedence: first match wins
It's how httpd(8) does it, and it allows us to call fnmatch less time
Diffstat (limited to 'gmid.h')
-rw-r--r--gmid.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gmid.h b/gmid.h
index 2b6a1c8..fc9ec53 100644
--- a/gmid.h
+++ b/gmid.h
@@ -76,6 +76,10 @@ struct vhost {
const char *dir;
const char *cgi;
int dirfd;
+
+ /* the first location rule is always '*' and holds the default
+ * settings for the vhost, from locations[1] onwards there are
+ * the "real" location rules specified in the configuration. */
struct location locations[LOCLEN];
};