diff options
Diffstat (limited to 'src/config.c')
| -rw-r--r-- | src/config.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index 7c1b655..c4c152c 100644 --- a/src/config.c +++ b/src/config.c @@ -152,12 +152,16 @@ conf_ini_handler(void *user, const char *section, const char *spec; char hostname[1024 + 1]; enum gmnisrv_routing routing; - size_t hostln = strcspn(section, ":~"); + size_t hostln = strcspn(section, "=:~"); switch (section[hostln]) { case '\0': routing = ROUTE_PATH; spec = "/"; break; + case '=': + routing = ROUTE_EXACT; + spec = §ion[hostln + 1]; + break; case ':': routing = ROUTE_PATH; spec = §ion[hostln + 1]; @@ -196,6 +200,7 @@ conf_ini_handler(void *user, const char *section, switch (route->routing) { case ROUTE_PATH: + case ROUTE_EXACT: route->path = strdup(spec); break; case ROUTE_REGEX: @@ -315,6 +320,7 @@ config_finish(struct gmnisrv_config *conf) while (route) { switch (route->routing) { case ROUTE_PATH: + case ROUTE_EXACT: free(route->path); break; case ROUTE_REGEX: |
