From 59b5ff6ccc8182a23beaf5774263f175e8cf7cef Mon Sep 17 00:00:00 2001 From: Carsten Rosenberg Date: Sat, 26 Jan 2019 13:49:02 +0100 Subject: [PATCH] [Minor] lua_scanners - icap check empty key --- lualib/lua_scanners/icap.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lualib/lua_scanners/icap.lua b/lualib/lua_scanners/icap.lua index 801db72f6..6ddd5fee6 100644 --- a/lualib/lua_scanners/icap.lua +++ b/lualib/lua_scanners/icap.lua @@ -69,7 +69,9 @@ local function icap_check(task, content, digest, rule) end if string.find(s, '[%a%d-+]-:') then local _,_,key,value = tostring(s):find("([%a%d-+]-):%s?(.+)") - icap_headers[key] = value + if key ~= nil then + icap_headers[key] = value + end end end lua_util.debugm(rule.name, task, '%s: icap_headers: %s', -- 2.39.5