aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-02-13 21:27:16 +0600
committerGitHub <noreply@github.com>2024-02-13 21:27:16 +0600
commit64c5a15ddd56ced2f87cebcfa66b2847d5ae860b (patch)
treecbe238603d80ce7e6777c9000b4f85716c0c2d24
parentdca0a49e6d35f157e7ffdf8b0f3e61f707013e09 (diff)
parent8d7081d8854ba4531686d643aebe61098976e250 (diff)
downloadrspamd-64c5a15ddd56ced2f87cebcfa66b2847d5ae860b.tar.gz
rspamd-64c5a15ddd56ced2f87cebcfa66b2847d5ae860b.zip
Merge pull request #4816 from rspamd/vstakhov-4808
[Fix] Encode headers in metadata exporter
-rw-r--r--src/plugins/lua/metadata_exporter.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/lua/metadata_exporter.lua b/src/plugins/lua/metadata_exporter.lua
index 7b353b8d2..d8a1bd6c5 100644
--- a/src/plugins/lua/metadata_exporter.lua
+++ b/src/plugins/lua/metadata_exporter.lua
@@ -323,10 +323,11 @@ local pushers = {
if type(v) == 'table' then
hdrs[pfx .. k] = ucl.to_format(v, 'json-compact')
else
- hdrs[pfx .. k] = v
+ hdrs[pfx .. k] = rspamd_util.mime_header_encode(v)
end
end
end
+
rspamd_http.request({
task = task,
url = rule.url,
@@ -366,12 +367,12 @@ local pushers = {
return true
end
rspamd_tcp.request({
- task=task,
- host=rule.host,
- port=rule.port,
- data=formatted,
- callback=json_raw_tcp_callback,
- read=false,
+ task = task,
+ host = rule.host,
+ port = rule.port,
+ data = formatted,
+ callback = json_raw_tcp_callback,
+ read = false,
})
end,
}