aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_scanners/icap.lua
diff options
context:
space:
mode:
authorventulis <72085617+ventulis@users.noreply.github.com>2020-11-13 18:09:02 +0100
committerventulis <72085617+ventulis@users.noreply.github.com>2020-11-13 18:09:02 +0100
commit9497c7103bb63d181498b1634aa3776d3c3145b0 (patch)
treebf9d92e44a14e978d8fca5db38b4aaf8e3a8820a /lualib/lua_scanners/icap.lua
parent7ac071f3f5644c2da0816cf3b8223894675c5fc7 (diff)
downloadrspamd-9497c7103bb63d181498b1634aa3776d3c3145b0.tar.gz
rspamd-9497c7103bb63d181498b1634aa3776d3c3145b0.zip
[Minor] Add Rspamd version to ICAP User Agent
Diffstat (limited to 'lualib/lua_scanners/icap.lua')
-rw-r--r--lualib/lua_scanners/icap.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lualib/lua_scanners/icap.lua b/lualib/lua_scanners/icap.lua
index 5b03347ca..c42f4ed99 100644
--- a/lualib/lua_scanners/icap.lua
+++ b/lualib/lua_scanners/icap.lua
@@ -32,6 +32,7 @@ local tcp = require "rspamd_tcp"
local upstream_list = require "rspamd_upstream_list"
local rspamd_logger = require "rspamd_logger"
local common = require "lua_scanners/common"
+local rspamd_version = rspamd_version
local N = 'icap'
@@ -105,7 +106,7 @@ local function icap_check(task, content, digest, rule)
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('Host: %s\r\n', addr:to_string()),
- "User-Agent: Rspamd\r\n",
+ string.format("User-Agent: Rspamd/%s-%s\r\n", rspamd_version('main'), rspamd_version('id')),
"Encapsulated: null-body=0\r\n\r\n",
}
local size = string.format("%x", tonumber(#content))