summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_task.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_task.c')
-rw-r--r--src/lua/lua_task.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index afe83c1a5..1a4c8dc34 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -2450,7 +2450,14 @@ rspamd_lua_push_header_array (lua_State *L,
lua_pushinteger (L, i);
}
else {
- return rspamd_lua_push_header (L, rh, how);
+ DL_FOREACH (rh, cur) {
+ if (!strong || strcmp (name, cur->name) == 0) {
+ return rspamd_lua_push_header (L, cur, how);
+ }
+ }
+
+ /* Not found with this case */
+ lua_pushnil (L);
}
return 1;