From: Andrew Lewis Date: Thu, 9 Feb 2017 15:36:11 +0000 (+0200) Subject: [Minor] Don't try handle gaps in Received headers X-Git-Tag: 1.5.0~143^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1407%2Fhead;p=thirdparty%2Frspamd.git [Minor] Don't try handle gaps in Received headers --- diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index a5152a458d..519c64b22c 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -712,14 +712,8 @@ local function multimap_callback(task, rule) received = function() local hdrs = task:get_received_headers() if hdrs and hdrs[1] then - local num_hdrs = 0 - for i in ipairs(hdrs) do - if i > num_hdrs then - num_hdrs = i - end - end for pos, h in ipairs(hdrs) do - match_received_header(rule, pos, num_hdrs, h) + match_received_header(rule, pos, #hdrs, h) end end end,