From addb2ff4ef8a0ada410722ea43e6335f3e4f905d Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 29 Sep 2019 12:27:52 +1000 Subject: checkPaths -> checkFiles --- README.md | 6 +++--- mirror-checker.lua | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7ac867b..fe62f04 100644 --- a/README.md +++ b/README.md @@ -243,10 +243,10 @@ written yet. Note that currently this downloads 4GB per mirror. Calls checkRedirects() with the host as first and second arguments, and includes the IP this time. The inclusion of the IP causes -checkRedirects() to call checkPaths(). +checkRedirects() to call checkFiles(). -checkPaths() will call checkHEAD() for each of the reference files. +checkFiles() will call checkHEAD() for each of the reference files. checkHEAD() uses LuaSocket (or LuaSec for HTTPS) to send a HEAD request to @@ -255,5 +255,5 @@ not be followed by that request. If the request returns a redirect, then checkHEAD() is called recursively. If the redirect is to some host we are not already checking, we call checkRedirects() on it, with an IP of "redir". This causes checkRedirects() to bypass the test that would -otherwise call checkPaths(), instead gathering the IPs and fork as usual. +otherwise call checkFiles(), instead gathering the IPs and fork as usual. 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) end end -local checkPaths = function (host, ip, path, file) +local checkFiles = function (host, ip, path, file) if nil ~= file then if "redirect" == ip then ip = host end I(" Checking IP for file " .. host .. " -> " .. ip .. " " .. path .. " " .. file) @@ -313,13 +313,13 @@ checkRedirects = function (orig, host, path, ip, file) local po = url.parse("http://" .. orig) if "" ~= file then D("checking redirected file " .. po.host .. " " .. file) - checkPaths(po.host, ip, path, file) + checkFiles(po.host, ip, path, file) else - checkPaths(po.host, ip, path) + checkFiles(po.host, ip, path) end else if orig == host then D("checkRedirects " .. orig .. "" .. file) else D("checkRedirects " .. orig .. " -> " .. host) end --- TODO - use checkPaths() here ^^^ on the original domain name, coz that's not getting caught yet. I think. +-- TODO - use checkFiles() here ^^^ on the original domain name, coz that's not getting caught yet. I think. gatherIPs(ph.host) for k, v in pairs(IP[ph.host]) do D(" DNS record " .. v .. " " .. ph.host .. " -> " .. k) -- cgit v1.1