From 112be7145d8381a99796b8588b5a81d9b57fb9c0 Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 24 Dec 2019 19:31:38 +1000 Subject: Oops, fix different host redirection. --- apt-panopticon.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 7f1d357..de2d43b 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -369,15 +369,15 @@ checkHEAD = function (host, URL, r, retry, sanity) Not good for deb.debian.org, which we should only be throwing .debs at. What we do is loop through the DNS entries, and only test the specific protocol & file being tested here. ]] - local u = pu.host .. "://" .. pu.path + local u = pu.host .. "/" .. pu.path local file = pu.path:match(".*/([%w%.%+%-_]*)$") -- Get the filename. local path = pu.path:sub(2, -1 -(#file)) local check = u:gsub("/", "_") local extraArgs = sendArgs .. ' -o -r ' - if 'https' == pu.scheme then extraArgs = ' --tests=-http' end - if 'http' == pu.scheme then extraArgs = ' --tests=-https' end + if 'https' == pu.scheme then extraArgs = extraArgs .. ' --tests=-http' end + if 'http' == pu.scheme then extraArgs = extraArgs .. ' --tests=-https' end I(" Now checking redirected host " .. u) - APT.fork("ionice -c3 nice -n 19 " .. downloadLock .. "REDIR-" .. check .. ".log" .. " ./apt-panopticon.lua " .. extraArgs .. pu.host .. "/" .. path .. " " .. file) + APT.fork("ionice -c3 nice -n 19 " .. downloadLock .. "REDIR-" .. check .. ".log" .. " ./apt-panopticon.lua " .. extraArgs .. ' ' .. pu.host .. "/" .. path .. " " .. file) end end end -- cgit v1.1