commit 9497c71: [Minor] Add Rspamd version to ICAP User Agent
ventulis
72085617+ventulis at users.noreply.github.com
Wed Nov 25 11:14:06 UTC 2020
Author: ventulis
Date: 2020-11-13 18:09:02 +0100
URL: https://github.com/rspamd/rspamd/commit/9497c7103bb63d181498b1634aa3776d3c3145b0
[Minor] Add Rspamd version to ICAP User Agent
---
lualib/lua_scanners/icap.lua | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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))
More information about the Commits
mailing list