From 0b08538f13b8aba68ce3c5092dfdd83a606cd887 Mon Sep 17 00:00:00 2001 From: dvs1 Date: Thu, 8 Aug 2024 17:13:13 +1000 Subject: Don't poke at HTTPS for URLsanity if the server doesn't actually support HTTPS. --- apt-panopticon.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 403cfa0..40baa58 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -308,6 +308,10 @@ checkHEAD = function (host, URL, r, retry, sanity) if "https" == PU.scheme and APT.options.roundRobin.value == host then I(spcd .. "Not testing " .. APT.lnk(URL) .. " mirrors wont have the correct HTTPS certificate for the round robin.", host) return +-- TODO - For some odd reason, sometimes one of these is nil. Dig deeper to figure out why. + elseif "https" == PU.scheme and (APT.mirrors[host] ~= nil) and (APT.mirrors[host].Protocols ~= nil) and (not APT.mirrors[host].Protocols.https) then + I(spcd .. "Not testing " .. APT.lnk(URL) .. " host doesn't support HTTPS.", host) + return else I(spcd .. check .. " " .. APT.lnk(URL), host) end -- cgit v1.1