diff options
author | Carsten Rosenberg <c.rosenberg@heinlein-support.de> | 2021-11-04 18:37:27 +0100 |
---|---|---|
committer | Carsten Rosenberg <c.rosenberg@heinlein-support.de> | 2021-11-04 18:37:27 +0100 |
commit | 78ca6debc2a472f375e1c3e3e9c1266c9d42187f (patch) | |
tree | 574fe22fb421ba5e5d1cd56102edb64ff59e1af2 /lualib/lua_scanners/icap.lua | |
parent | a09ff44509d1384645f659a5e42a8f179ca34fae (diff) | |
download | rspamd-78ca6debc2a472f375e1c3e3e9c1266c9d42187f.tar.gz rspamd-78ca6debc2a472f375e1c3e3e9c1266c9d42187f.zip |
[Minor] lua_scanners - icap - restart from scratch on requery / stop early on failed header
Diffstat (limited to 'lualib/lua_scanners/icap.lua')
-rw-r--r-- | lualib/lua_scanners/icap.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lualib/lua_scanners/icap.lua b/lualib/lua_scanners/icap.lua index 0bca81a97..d2a418fb1 100644 --- a/lualib/lua_scanners/icap.lua +++ b/lualib/lua_scanners/icap.lua @@ -223,6 +223,8 @@ local function icap_check(task, content, digest, rule, maybe_part) tcp_options.host = addr:to_string() tcp_options.port = addr:get_port() + tcp_options.callback = icap_callback + tcp_options.data = options_request tcp.request(tcp_options) @@ -408,6 +410,7 @@ local function icap_check(task, content, digest, rule, maybe_part) '%s: icap error X-Infection-Found: %s', rule.log_prefix, icap_threat) common.yield_result(task, rule, icap_threat, 0, 'fail', maybe_part) + return true else lua_util.debugm(rule.name, task, '%s: icap X-Infection-Found: %s', rule.log_prefix, icap_threat) |