aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorCarsten Rosenberg <c.rosenberg@heinlein-support.de>2021-11-02 21:13:07 +0100
committerCarsten Rosenberg <c.rosenberg@heinlein-support.de>2021-11-02 21:13:07 +0100
commit3d39bd4c3f9703094fc288826f5b3d64f2483b30 (patch)
tree961c59b122d49a156a91885035b304c08c922b98 /lualib
parentd41e039af356b68e5914528a4bc78b6be3d9b21c (diff)
downloadrspamd-3d39bd4c3f9703094fc288826f5b3d64f2483b30.tar.gz
rspamd-3d39bd4c3f9703094fc288826f5b3d64f2483b30.zip
[Minor] lua_scanners - icap - use Allow 204 again
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_scanners/icap.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/lualib/lua_scanners/icap.lua b/lualib/lua_scanners/icap.lua
index 899855059..0eb5f8583 100644
--- a/lualib/lua_scanners/icap.lua
+++ b/lualib/lua_scanners/icap.lua
@@ -556,10 +556,11 @@ local function icap_check(task, content, digest, rule, maybe_part)
if icap_headers.icap and string.find(icap_headers.icap, 'ICAP%/1%.. 2%d%d') then
if icap_headers['Methods'] and string.find(icap_headers['Methods'], 'RESPMOD') then
- --Preview is currently ununsed
- --if icap_headers['Allow'] and string.find(icap_headers['Allow'], '204') then
- -- add_respond_header('Allow', '204')
- --end
+ -- Allow "204 No Content" responses
+ -- https://datatracker.ietf.org/doc/html/rfc3507#section-4.6
+ if icap_headers['Allow'] and string.find(icap_headers['Allow'], '204') then
+ add_respond_header('Allow', '204')
+ end
if rule.x_client_header then
local client = task:get_from_ip()