From 7e8a9537949f298eef026f6b97b8c349a9b56ea0 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 29 Oct 2020 22:47:56 -0400 Subject: Initial pass on regex routing support All this does is parse the regexes out of the config file. I've vendored libregexp from Bellard's quickjs project, because it's reasonably small and self-contained, and POSIX regexes don't support captures. We're eventually going to want captures for URL rewrites, so this'll do for now. --- include/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/config.h') diff --git a/include/config.h b/include/config.h index 3a7d7b4..cf9f2a3 100644 --- a/include/config.h +++ b/include/config.h @@ -2,8 +2,8 @@ #define GMNISRV_CONFIG #include #include -#include #include +#include "regexp.h" struct gmnisrv_tls { char *store; @@ -21,7 +21,7 @@ struct gmnisrv_route { char *spec; union { char *path; - regex_t *regex; + uint8_t *regex; }; char *root; -- cgit v1.2.3