From 66a6a02d0147dc7a5761bb812097561ae2dbf8c0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 29 Aug 2022 21:20:52 +0100 Subject: [PATCH] [Minor] Require number as header order Issue: #4246 --- lualib/lua_mime.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua index 01a2fc95e..50c6ccd43 100644 --- a/lualib/lua_mime.lua +++ b/lualib/lua_mime.lua @@ -527,7 +527,7 @@ exports.modify_headers = function(task, hdr_alterations) end local add_tbl = hdr_flattened[hname].add if hdr.value then - table.insert(add_tbl, {hdr.order or -1, hdr.value}) + table.insert(add_tbl, {tonumber(hdr.order) or -1, hdr.value}) elseif type(hdr) == 'table' then for _,v in ipairs(hdr) do table.insert(add_tbl, {-1, v}) -- 2.39.5