aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-18 20:19:13 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-18 20:19:13 +0000
commitc399ca466f600a3f57da728d9ec0e0a421402563 (patch)
treed1d2b6d9419e55f6f4488b7d1ee127dec8dc3d27 /lualib
parent12a9552a9ca7490ed8c4c53a78c2e3e580076cdc (diff)
downloadrspamd-c399ca466f600a3f57da728d9ec0e0a421402563.tar.gz
rspamd-c399ca466f600a3f57da728d9ec0e0a421402563.zip
[Minor] Fix tests
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_dkim_tools.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/lualib/lua_dkim_tools.lua b/lualib/lua_dkim_tools.lua
index 7d237a326..fc891ba71 100644
--- a/lualib/lua_dkim_tools.lua
+++ b/lualib/lua_dkim_tools.lua
@@ -122,10 +122,14 @@ local function prepare_dkim_signing(N, task, settings)
if settings.use_http_headers then
local res,tbl = parse_dkim_http_headers(N, task, settings)
- if not res and settings.allow_headers_fallback then
- return res,{}
+ if not res then
+ if not settings.allow_headers_fallback then
+ return res,{}
+ else
+ lua_util.debugm(N, task, 'failed to read http headers, fallback to normal schema')
+ end
else
- lua_util.debugm(N, task, 'failed to read http headers, fallback to normal schema')
+ return res,tbl
end
end