From 075230158af98706eff3e3d4ac723f9c802e9f9e Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sun, 18 Jul 2021 23:44:39 -0400 Subject: [PATCH] [core] make missing mod_deflate not a fatal error mod_compress was removed in lighttpd 1.4.56, subsumed by mod_deflate. distros may package mod_deflate separately from the lighttpd package. However, existing configurations may reference mod_compress. lighttpd maps the reference from mod_compress to mod_deflate, but after a system is upgraded to lighttpd 1.4.56 or later, mod_compress may have been removed, and mod_deflate -- which might be a separate package -- might not be installed. lighttpd will still issue error trace about the missing mod_deflate modules, as well as about the unrecognized configuration directives (compress.* or deflate.*), but this will no longer be a fatal error. --- src/plugin.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/plugin.c b/src/plugin.c index 814b78ea..2f348efe 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -143,6 +143,10 @@ int plugins_load(server *srv) { } if (!load_functions[j].name) { log_error(srv->errh, __FILE__, __LINE__, "%s plugin not found", module); + if (srv->srvconf.compat_module_load) { + if (buffer_eq_slen(&ds->value, CONST_STR_LEN("mod_deflate"))) + continue; + } return -1; } } @@ -183,6 +187,10 @@ int plugins_load(server *srv) { plugin_free(p); + if (srv->srvconf.compat_module_load) { + if (buffer_eq_slen(module, CONST_STR_LEN("mod_deflate"))) + continue; + } return -1; } @@ -193,6 +201,10 @@ int plugins_load(server *srv) { plugin_free(p); + if (srv->srvconf.compat_module_load) { + if (buffer_eq_slen(module, CONST_STR_LEN("mod_deflate"))) + continue; + } return -1; }