diff options
-rwxr-xr-x | apt-panopticon.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 8b8728b..9d2b783 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -352,7 +352,13 @@ checkHEAD = function (host, URL, r, retry, sanity) | |||
352 | if nil ~= location then | 352 | if nil ~= location then |
353 | pu = url.parse(location, defaultURL) | 353 | pu = url.parse(location, defaultURL) |
354 | if ('http' == location:sub(1, 4)) and (pu.scheme ~= PU.scheme) then -- Sometimes a location sans scheme is returned, this is not a protocol change. | 354 | if ('http' == location:sub(1, 4)) and (pu.scheme ~= PU.scheme) then -- Sometimes a location sans scheme is returned, this is not a protocol change. |
355 | if APT.testing("Protocol") then W(" protocol changed during redirect! " .. check .. " " .. host .. " -> " .. URL .. " -> " .. location, PU.scheme, "Protocol", host) end | 355 | if APT.testing("Protocol") then |
356 | if APT.options.roundRobin.value == host then -- Coz HTTPS shouldn't happen via the round robin. | ||
357 | E(" protocol changed during redirect! " .. check .. " " .. host .. " -> " .. URL .. " -> " .. location, PU.scheme, "Protocol", host) | ||
358 | end | ||
359 | W(" protocol changed during redirect! " .. check .. " " .. host .. " -> " .. URL .. " -> " .. location, PU.scheme, "Protocol", host) | ||
360 | else | ||
361 | end | ||
356 | end | 362 | end |
357 | 363 | ||
358 | if location == URL then | 364 | if location == URL then |
@@ -613,7 +619,7 @@ local getMirrors = function () | |||
613 | end | 619 | end |
614 | end | 620 | end |
615 | if APT.testing("DNSRR") then | 621 | if APT.testing("DNSRR") then |
616 | mirrors[APT.options.roundRobin.value] = { ["Protocols"] = { ["http"] = true; ["https"] = true; }; ['Updated'] = 300; | 622 | mirrors[APT.options.roundRobin.value] = { ["Protocols"] = { ["http"] = true; }; ['Updated'] = 300; |
617 | ["FQDN"] = APT.options.roundRobin.value; ["Active"] = 'yes'; ["BaseURL"] = APT.options.roundRobin.value; } | 623 | ["FQDN"] = APT.options.roundRobin.value; ["Active"] = 'yes'; ["BaseURL"] = APT.options.roundRobin.value; } |
618 | end | 624 | end |
619 | local file, e = io.open("results/mirrors.lua", "w+") | 625 | local file, e = io.open("results/mirrors.lua", "w+") |