aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apt-panopticon.lua
diff options
context:
space:
mode:
Diffstat (limited to 'apt-panopticon.lua')
-rwxr-xr-xapt-panopticon.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index 8e40449..2058b4e 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -446,14 +446,14 @@ checkHEAD = function (host, URL, r, retry)
446 hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' 446 hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"'
447 local status, result = execute(cmd) 447 local status, result = execute(cmd)
448 os.execute('cat results/"HEADERS_' .. fname .. '" >>results/"STATUS_' .. fname .. '" 2>/dev/null; rm results/"HEADERS_' .. fname .. '" 2>/dev/null') 448 os.execute('cat results/"HEADERS_' .. fname .. '" >>results/"STATUS_' .. fname .. '" 2>/dev/null; rm results/"HEADERS_' .. fname .. '" 2>/dev/null')
449 if "28" == status then 449 if "0" ~= status then
450 E(" TIMEOUT " .. timeouts + 1 .. ", retry " .. retry + 1, PU.scheme, "", host)
451 timeouts = timeouts + 1
452 checkHEAD(host, URL, r, retry + 1, timeouts)
453 return
454 elseif "0" ~= status then
455 local msg = curlStatus[0 + status] 450 local msg = curlStatus[0 + status]
456 E(" The curl command return an error code of " .. status .. "- " .. msg, PU.scheme, "", host) 451 if nil == msg then msg = "UNKNOWN CURL STATUS CODE!" end
452 E(" The curl command return an error code of " .. status .. " - " .. msg, PU.scheme, "", host)
453 if ("28" == status) or ("7" == status) then
454 E(" TIMEOUT " .. timeouts + 1 .. ", retry " .. retry + 1, PU.scheme, "", host)
455 timeouts = timeouts + 1
456 end
457 checkHEAD(host, URL, r, retry + 1, timeouts) 457 checkHEAD(host, URL, r, retry + 1, timeouts)
458 return 458 return
459 end 459 end