diff options
author | onefang | 2019-12-24 19:31:38 +1000 |
---|---|---|
committer | onefang | 2019-12-24 19:31:38 +1000 |
commit | 112be7145d8381a99796b8588b5a81d9b57fb9c0 (patch) | |
tree | 48a1c93b4de0e2d12506684291bc2b65a87e0ab7 | |
parent | Log both origin and destination in a redirect loop. (diff) | |
download | apt-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-x | apt-panopticon.lua | 8 |
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 |