aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_scanners
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-11-25 13:33:28 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-11-25 13:33:28 +0000
commit6eb16795cc5b97d7c6a03a9c112d7e23dc063eb9 (patch)
tree04f1301e718bae09703948a29b61134655d4911b /lualib/lua_scanners
parent4cb093dc3021bf013f0d7fe96379a06147cbe738 (diff)
downloadrspamd-6eb16795cc5b97d7c6a03a9c112d7e23dc063eb9.tar.gz
rspamd-6eb16795cc5b97d7c6a03a9c112d7e23dc063eb9.zip
[Minor] Fix style
Diffstat (limited to 'lualib/lua_scanners')
-rw-r--r--lualib/lua_scanners/icap.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/lualib/lua_scanners/icap.lua b/lualib/lua_scanners/icap.lua
index 9efe1c14c..af9d070dc 100644
--- a/lualib/lua_scanners/icap.lua
+++ b/lualib/lua_scanners/icap.lua
@@ -107,12 +107,16 @@ local function icap_check(task, content, digest, rule)
-- Build extended User Agent
if rule.user_agent == "extended" then
- rule.user_agent = string.format("Rspamd/%s-%s (%s/%s)", rspamd_version('main'), rspamd_version('id'), rspamd_util.get_hostname(), string.sub(task:get_uid(), 1,6))
+ rule.user_agent = string.format("Rspamd/%s-%s (%s/%s)",
+ rspamd_version('main'),
+ rspamd_version('id'),
+ rspamd_util.get_hostname(),
+ string.sub(task:get_uid(), 1,6))
end
-- Build the icap queries
local options_request = {
- string.format("OPTIONS icap://%s:%s/%s ICAP/1.0\r\n", addr:to_string(), addr:get_port(), rule.scheme),
+ string.format("OPTIONS icap://%s/%s ICAP/1.0\r\n", addr:to_string(true), rule.scheme),
string.format('Host: %s\r\n', addr:to_string()),
string.format("User-Agent: %s\r\n", rule.user_agent),
"Encapsulated: null-body=0\r\n\r\n",