]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Don't try handle gaps in Received headers 1407/head
authorAndrew Lewis <nerf@judo.za.org>
Thu, 9 Feb 2017 15:36:11 +0000 (17:36 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Thu, 9 Feb 2017 15:36:11 +0000 (17:36 +0200)
src/plugins/lua/multimap.lua

index a5152a458d0250e7829237d6984586639b2ad8de..519c64b22c7022ebef028f42fb0a998ea13ee6ce 100644 (file)
@@ -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,