From a58c93ae7fe87956bb255c8561f591aa1a761203 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 26 Jun 2019 12:18:27 +0100 Subject: [Minor] DCC: Unfold DCC header --- lualib/lua_scanners/dcc.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3