diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-09-22 13:52:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-22 13:52:24 +0100 |
commit | 74ef607bce362c105df5fac8eb438b7dfe911ca4 (patch) | |
tree | 16668ca4ca09cba599015d96b6ebeaf4d8ec6daf /lualib | |
parent | e49db7977d5e649ea6e59e21d3b316d6b002f2d1 (diff) | |
parent | 313bda11b8a4a407c80f314d4af08f3297e350cc (diff) | |
download | rspamd-74ef607bce362c105df5fac8eb438b7dfe911ca4.tar.gz rspamd-74ef607bce362c105df5fac8eb438b7dfe911ca4.zip |
Merge pull request #4608 from lbahtarliev/master
[Fix] Change Date: header location to conform with RFC
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_scanners/icap.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/lua_scanners/icap.lua b/lualib/lua_scanners/icap.lua index 59d2caa4a..b0886f2f7 100644 --- a/lualib/lua_scanners/icap.lua +++ b/lualib/lua_scanners/icap.lua @@ -242,7 +242,6 @@ local function icap_check(task, content, digest, rule, maybe_part) local in_client_ip = task:get_from_ip() local req_hlen = 2 - table.insert(req_headers, string.format('Date: %s\r\n', rspamd_util.time_to_string(rspamd_util.get_time()))) if maybe_part then table.insert(req_headers, string.format('GET http://%s/%s HTTP/1.0\r\n', in_client_ip, maybe_part:get_filename())) table.insert(http_headers, string.format('Content-Type: %s/%s\r\n', maybe_part:get_detected_type())) @@ -250,6 +249,7 @@ local function icap_check(task, content, digest, rule, maybe_part) table.insert(req_headers, string.format('GET %s HTTP/1.0\r\n', rule.req_fake_url)) table.insert(http_headers, string.format('Content-Type: application/octet-stream\r\n')) end + table.insert(req_headers, string.format('Date: %s\r\n', rspamd_util.time_to_string(rspamd_util.get_time()))) if rule.user_agent ~= "none" then table.insert(req_headers, string.format("User-Agent: %s\r\n", rule.user_agent)) end |