aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mirror-checker.lua
diff options
context:
space:
mode:
authoronefang2019-09-29 12:27:52 +1000
committeronefang2019-09-29 12:27:52 +1000
commitaddb2ff4ef8a0ada410722ea43e6335f3e4f905d (patch)
tree78af16f3b8a02912ee28bbdf5542c978ec2781d8 /mirror-checker.lua
parentcheckURL -> checkHEAD (diff)
downloadapt-panopticon-addb2ff4ef8a0ada410722ea43e6335f3e4f905d.zip
apt-panopticon-addb2ff4ef8a0ada410722ea43e6335f3e4f905d.tar.gz
apt-panopticon-addb2ff4ef8a0ada410722ea43e6335f3e4f905d.tar.bz2
apt-panopticon-addb2ff4ef8a0ada410722ea43e6335f3e4f905d.tar.xz
checkPaths -> checkFiles
Diffstat (limited to 'mirror-checker.lua')
-rwxr-xr-xmirror-checker.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/mirror-checker.lua b/mirror-checker.lua
index 23c7e33..f443789 100755
--- a/mirror-checker.lua
+++ b/mirror-checker.lua
@@ -275,7 +275,7 @@ checkHEAD = function (host, URL, r, retry)
275 end 275 end
276end 276end
277 277
278local checkPaths = function (host, ip, path, file) 278local checkFiles = function (host, ip, path, file)
279 if nil ~= file then 279 if nil ~= file then
280 if "redirect" == ip then ip = host end 280 if "redirect" == ip then ip = host end
281 I(" Checking IP for file " .. host .. " -> " .. ip .. " " .. path .. " " .. file) 281 I(" Checking IP for file " .. host .. " -> " .. ip .. " " .. path .. " " .. file)
@@ -313,13 +313,13 @@ checkRedirects = function (orig, host, path, ip, file)
313 local po = url.parse("http://" .. orig) 313 local po = url.parse("http://" .. orig)
314 if "" ~= file then 314 if "" ~= file then
315 D("checking redirected file " .. po.host .. " " .. file) 315 D("checking redirected file " .. po.host .. " " .. file)
316 checkPaths(po.host, ip, path, file) 316 checkFiles(po.host, ip, path, file)
317 else 317 else
318 checkPaths(po.host, ip, path) 318 checkFiles(po.host, ip, path)
319 end 319 end
320 else 320 else
321 if orig == host then D("checkRedirects " .. orig .. "" .. file) else D("checkRedirects " .. orig .. " -> " .. host) end 321 if orig == host then D("checkRedirects " .. orig .. "" .. file) else D("checkRedirects " .. orig .. " -> " .. host) end
322-- TODO - use checkPaths() here ^^^ on the original domain name, coz that's not getting caught yet. I think. 322-- TODO - use checkFiles() here ^^^ on the original domain name, coz that's not getting caught yet. I think.
323 gatherIPs(ph.host) 323 gatherIPs(ph.host)
324 for k, v in pairs(IP[ph.host]) do 324 for k, v in pairs(IP[ph.host]) do
325 D(" DNS record " .. v .. " " .. ph.host .. " -> " .. k) 325 D(" DNS record " .. v .. " " .. ph.host .. " -> " .. k)