From e02cb38c87d72c506a68acb7f78315919c545a6f Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Wed, 10 May 2023 01:47:31 -0400 Subject: [core] treat mod_h2 as built-in module (for now) Note: a future release of lighttpd will build mod_h2 as a separate module (not built-in) when lighttpd is built with shared modules (.so) --- src/configfile.c | 2 -- src/plugin.c | 2 ++ src/server.c | 7 ------- 3 files changed, 2 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/configfile.c b/src/configfile.c index a44a937c..9ca13262 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -959,10 +959,8 @@ static int config_insert_srvconf(server *srv) { if (0 == srv->srvconf.port) srv->srvconf.port = ssl_enabled ? 443 : 80; - #if 0 /*(until switch to mod_h2)*/ if (config_feature_bool(srv, "server.h2proto", 1)) array_insert_value(srv->srvconf.modules, CONST_STR_LEN("mod_h2")); - #endif config_check_module_duplicates(srv); diff --git a/src/plugin.c b/src/plugin.c index 636706e3..8cd79230 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -135,6 +135,8 @@ int plugins_load(server *srv) { if (srv->srvconf.compat_module_load) { if (buffer_eq_slen(&ds->value, CONST_STR_LEN("mod_deflate"))) continue; + if (buffer_eq_slen(&ds->value, CONST_STR_LEN("mod_h2"))) + continue; } return -1; } diff --git a/src/server.c b/src/server.c index 9487ad08..44385db1 100644 --- a/src/server.c +++ b/src/server.c @@ -177,10 +177,6 @@ static size_t malloc_top_pad; #define unsetenv(name) _putenv_s((name), "") #endif -#if 1 /*(until switch to mod_h2)*/ -extern const struct http_dispatch h2_dispatch_table; /* declaration */ -#endif - #include "h1.h" static const struct http_dispatch h1_1_dispatch_table = { .send_1xx = h1_send_1xx @@ -1644,9 +1640,6 @@ static int server_main_setup (server * const srv, int argc, char **argv) { } http_dispatch[HTTP_VERSION_1_1] = h1_1_dispatch_table; /* copy struct */ - #if 1 /*(until switch to mod_h2)*/ - http_dispatch[HTTP_VERSION_2] = h2_dispatch_table; /* copy struct */ - #endif if (config_feature_bool(srv, "server.h2-discard-backend-1xx", 0)) http_dispatch[HTTP_VERSION_2].send_1xx = 0; -- cgit v1.2.1