aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-12-24 19:31:38 +1000
committeronefang2019-12-24 19:31:38 +1000
commit112be7145d8381a99796b8588b5a81d9b57fb9c0 (patch)
tree48a1c93b4de0e2d12506684291bc2b65a87e0ab7
parentLog both origin and destination in a redirect loop. (diff)
downloadapt-panopticon-112be7145d8381a99796b8588b5a81d9b57fb9c0.zip
apt-panopticon-112be7145d8381a99796b8588b5a81d9b57fb9c0.tar.gz
apt-panopticon-112be7145d8381a99796b8588b5a81d9b57fb9c0.tar.bz2
apt-panopticon-112be7145d8381a99796b8588b5a81d9b57fb9c0.tar.xz
Oops, fix different host redirection.
-rwxr-xr-xapt-panopticon.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index 7f1d357..de2d43b 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -369,15 +369,15 @@ checkHEAD = function (host, URL, r, retry, sanity)
369 Not good for deb.debian.org, which we should only be throwing .debs at. 369 Not good for deb.debian.org, which we should only be throwing .debs at.
370 What we do is loop through the DNS entries, and only test the specific protocol & file being tested here. 370 What we do is loop through the DNS entries, and only test the specific protocol & file being tested here.
371 ]] 371 ]]
372 local u = pu.host .. "://" .. pu.path 372 local u = pu.host .. "/" .. pu.path
373 local file = pu.path:match(".*/([%w%.%+%-_]*)$") -- Get the filename. 373 local file = pu.path:match(".*/([%w%.%+%-_]*)$") -- Get the filename.
374 local path = pu.path:sub(2, -1 -(#file)) 374 local path = pu.path:sub(2, -1 -(#file))
375 local check = u:gsub("/", "_") 375 local check = u:gsub("/", "_")
376 local extraArgs = sendArgs .. ' -o -r ' 376 local extraArgs = sendArgs .. ' -o -r '
377 if 'https' == pu.scheme then extraArgs = ' --tests=-http' end 377 if 'https' == pu.scheme then extraArgs = extraArgs .. ' --tests=-http' end
378 if 'http' == pu.scheme then extraArgs = ' --tests=-https' end 378 if 'http' == pu.scheme then extraArgs = extraArgs .. ' --tests=-https' end
379 I(" Now checking redirected host " .. u) 379 I(" Now checking redirected host " .. u)
380 APT.fork("ionice -c3 nice -n 19 " .. downloadLock .. "REDIR-" .. check .. ".log" .. " ./apt-panopticon.lua " .. extraArgs .. pu.host .. "/" .. path .. " " .. file) 380 APT.fork("ionice -c3 nice -n 19 " .. downloadLock .. "REDIR-" .. check .. ".log" .. " ./apt-panopticon.lua " .. extraArgs .. ' ' .. pu.host .. "/" .. path .. " " .. file)
381 end 381 end
382 end 382 end
383 end 383 end