--- a/src/server/daemon/location.h Sun Nov 23 15:05:37 2025 +0100 +++ b/src/server/daemon/location.h Tue Nov 25 19:44:58 2025 +0100 @@ -43,6 +43,8 @@ extern "C" { #endif +#define WS_LOCATION_NMATCH 16 + typedef struct WSLocation WSLocation; typedef struct WSLocationConfig WSLocationConfig; @@ -55,6 +57,11 @@ struct WSLocationConfig { /* + * location regex match results + */ + regmatch_t match[WS_LOCATION_NMATCH]; + + /* * Activate dirindex setting */ WSBool set_dirindex; @@ -146,7 +153,7 @@ WSLocation* cfg_location_get(ServerConfiguration *cfg, ConfigNode *obj); int location_apply_config(WSLocationConfig *target, WSLocation *loc); -int location_match(WSLocation *loc, cxstring uri); +int location_match(WSLocation *loc, cxstring uri, regmatch_t *match); WSLocationConfig* location_match_and_get_config(pool_handle_t *pool, cxstring uri, WSLocation *loc); WSLocationConfig* cfg_location_match(Session *sn, Request *rq);