diff options
-rw-r--r-- | lualib/lua_scanners/dcc.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lualib/lua_scanners/dcc.lua b/lualib/lua_scanners/dcc.lua index d1bec769b..9043391d2 100644 --- a/lualib/lua_scanners/dcc.lua +++ b/lualib/lua_scanners/dcc.lua @@ -126,11 +126,13 @@ local function dcc_check(task, content, digest, rule) else -- Parse the response if upstream then upstream:ok() end - local _,_,result,disposition,header = tostring(data):find("(.-)\n(.-)\n(.-)\n") + local _,_,result,disposition,header = tostring(data):find("(.-)\n(.-)\n(.-)$") lua_util.debugm(rule.name, task, 'DCC result=%1 disposition=%2 header="%3"', result, disposition, header) if header then + -- Unfold header + header = header:gsub('\r?\n%s*', ' ') local _,_,info = header:find("; (.-)$") if (result == 'R') then -- Reject |