From e3ddf390950bf51d0c6c9cc6b931879006936e4c Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Sat, 6 Feb 2021 18:28:43 +0000 Subject: add the ``entrypoint'' option --- server.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'server.c') diff --git a/server.c b/server.c index ec44649..33eda69 100644 --- a/server.c +++ b/server.c @@ -481,8 +481,15 @@ handle_open_conn(struct pollfd *fds, struct client *c) return; } - if (!apply_block_return(fds, c)) - open_file(fds, c); + if (apply_block_return(fds, c)) + return; + + if (c->host->entrypoint != NULL) { + start_cgi(c->host->entrypoint, c->iri.path, fds, c); + return; + } + + open_file(fds, c); } static void -- cgit v1.2.3