From e4408ee1d15eacd3d106fc5f6c68521f4e3c91c5 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 29 Jul 2017 16:22:46 +0100 Subject: [PATCH] [Minor] Some more minor fixes to lua Conflicts: src/plugins/lua/fann_redis.lua --- rules/headers_checks.lua | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/rules/headers_checks.lua b/rules/headers_checks.lua index 2e4bae307..25cb263ff 100644 --- a/rules/headers_checks.lua +++ b/rules/headers_checks.lua @@ -920,15 +920,12 @@ rspamd_config.CTYPE_MIXED_BOGUS = { local found = false -- Check each part and look for a part that isn't multipart/* or text/plain or text/html for _,p in ipairs(parts) do - local ct = p:get_header('Content-Type') - if (ct) then - ct = ct:lower() - if (ct:match('^multipart/') or - ct:match('^text/plain') or - ct:match('^text/html')) - then - -- Nothing - else + local pct = p:get_header('Content-Type') + if (pct) then + pct = pct:lower() + if not ((pct:match('^multipart/') or + pct:match('^text/plain') or + pct:match('^text/html'))) then found = true end end -- 2.39.5