1 Star 0 Fork 14

mayp/lighttpd

forked from src-openEuler/lighttpd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-loading-mod_auth-after-dynamic-modules.patch 2.60 KB
一键复制 编辑 原始数据 按行查看 历史
wk333 提交于 2022-07-30 15:43 . Update to 1.4.63
From 492773a20f8a1deb1c94e25d40023970dd9608a1 Mon Sep 17 00:00:00 2001
From: Glenn Strauss <gstrauss@gluelogic.com>
Date: Sun, 5 Dec 2021 07:50:17 -0500
Subject: [PATCH] [core] fix trace issued for loading mod_auth (fixes #3121)
Origin:https://github.com/lighttpd/lighttpd1.4/commit/492773a20f8a1deb1c94e25d40023970dd9608a1
fix trace issued for loading mod_auth after dynamic modules
x-ref:
"Curious message on startup with version 1.4.63"
https://redmine.lighttpd.net/boards/2/topics/10182
"mod_auth warning on startup"
https://redmine.lighttpd.net/issues/3121
---
src/configfile.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/configfile.c b/src/configfile.c
index 5760bb43..033f2c46 100644
--- a/src/configfile.c
+++ b/src/configfile.c
@@ -369,6 +369,7 @@ static void config_compat_module_load (server *srv) {
int contains_mod_auth = 0;
int prepend_mod_auth = 0;
int prepend_mod_vhostdb = 0;
+ const char *dyn_name = NULL;
for (uint32_t i = 0; i < srv->srvconf.modules->used; ++i) {
buffer *m = &((data_string *)srv->srvconf.modules->data[i])->value;
@@ -390,8 +391,15 @@ static void config_compat_module_load (server *srv) {
else if (buffer_eq_slen(m, CONST_STR_LEN("mod_wolfssl")))
append_mod_openssl = 0;
else if (0 == strncmp(m->ptr, "mod_auth", sizeof("mod_auth")-1)) {
- if (buffer_eq_slen(m, CONST_STR_LEN("mod_auth")))
- contains_mod_auth = 1;
+ if (buffer_eq_slen(m, CONST_STR_LEN("mod_auth"))) {
+ if (!contains_mod_auth) {
+ contains_mod_auth = 1;
+ if (dyn_name)
+ log_error(srv->errh, __FILE__, __LINE__,
+ "Warning: mod_auth should be listed in server.modules"
+ " before dynamic backends such as %s", dyn_name);
+ }
+ }
else if (!contains_mod_auth)
prepend_mod_auth = 1;
@@ -422,11 +430,8 @@ static void config_compat_module_load (server *srv) {
sizeof("mod_sockproxy")-1)
|| 0 == strncmp(m->ptr, "mod_wstunnel",
sizeof("mod_wstunnel")-1)) {
- if (!contains_mod_auth) {
- log_error(srv->errh, __FILE__, __LINE__,
- "Warning: mod_auth should be listed in server.modules before "
- "dynamic backends such as %s", m->ptr);
- }
+ if (NULL == dyn_name)
+ dyn_name = m->ptr;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/myp-imago/lighttpd.git
git@gitee.com:myp-imago/lighttpd.git
myp-imago
lighttpd
lighttpd
master

搜索帮助