From 94472fd38ec7bdfa7d4495959fb5695e269832fd Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 17 Jul 2020 02:51:41 +1000 Subject: Check for nil FDQN and BaseURL. Should move that up higher. Something else is going wrong. --- apt-panopticon.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apt-panopticon.lua b/apt-panopticon.lua index b44843b..b0f0049 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -576,8 +576,12 @@ local validateURL = function(m) local p = url.parse("http://" .. m.BaseURL) if nil == p.path then p.path = '' end if nil ~= p.port then p.authority = authority .. ':' .. p.port end - if m.FQDN ~= p.authority then W("Something wrong in FDQN from mirror_list.txt! " .. m.FDQN, "", "", p.authority) end - if m.BaseURL ~= (p.authority .. p.path) then W("Something wrong in BaseURL from mirror_list.txt! " .. m.BaseURL, "", "", p.authority) end + if nil == m.FDQN then W("Something wrong in FDQN from mirror_list.txt! nil", "", "", p.authority) else + if m.FQDN ~= p.authority then W("Something wrong in FDQN from mirror_list.txt! " .. m.FDQN, "", "", p.authority) end + end + if nil == m.BaseURL then W("Something wrong in BaseURL from mirror_list.txt! nil", "", "", p.authority) else + if m.BaseURL ~= (p.authority .. p.path) then W("Something wrong in BaseURL from mirror_list.txt! " .. m.BaseURL, "", "", p.authority) end + end if (nil ~= p.query) or (nil ~= p.fragment) or (nil ~= p.params) then W("Something wrong in BaseURL from mirror_list.txt, should be nothing after the path! " .. m.BaseURL, "", "", p.authority) end if (nil ~= p.user) or (nil ~= p.userinfo) or (nil ~= p.password) then W("Something wrong in BaseURL from mirror_list.txt, should be no credentials! " .. m.BaseURL, "", "", p.authority) end m.FQDN = p.authority -- cgit v1.1