From 4614fba9ef02f79fef40ce82bab3cb8fabb1eefd Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Thu, 9 Feb 2017 17:36:11 +0200 Subject: [PATCH] [Minor] Don't try handle gaps in Received headers --- src/plugins/lua/multimap.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index a5152a458..519c64b22 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, -- 2.39.5