]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Some more minor fixes to lua
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 29 Jul 2017 15:22:46 +0000 (16:22 +0100)
committerAndrew Lewis <nerf@judo.za.org>
Mon, 28 Aug 2017 11:45:22 +0000 (13:45 +0200)
Conflicts:
src/plugins/lua/fann_redis.lua

rules/headers_checks.lua

index 2e4bae3073f52fdb56f7c709f8e1971b240fabb8..25cb263ff8de9ed804b30b4fca31fb4eb2bcad43 100644 (file)
@@ -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