aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-09-30 21:52:28 +1000
committeronefang2019-09-30 21:52:28 +1000
commit0fe446ff79fd87eb56c5e4f48238b3c47634422f (patch)
tree258630dfb3d2f9aa9a49d3539ccf941a3c8b771e
parentOops, should have been part of te last commit. (diff)
downloadapt-panopticon-0fe446ff79fd87eb56c5e4f48238b3c47634422f.zip
apt-panopticon-0fe446ff79fd87eb56c5e4f48238b3c47634422f.tar.gz
apt-panopticon-0fe446ff79fd87eb56c5e4f48238b3c47634422f.tar.bz2
apt-panopticon-0fe446ff79fd87eb56c5e4f48238b3c47634422f.tar.xz
If only the protocol changed, just log and return.
The other protocol will be tested later.
-rwxr-xr-xmirror-checker.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/mirror-checker.lua b/mirror-checker.lua
index 074064c..b49c725 100755
--- a/mirror-checker.lua
+++ b/mirror-checker.lua
@@ -244,8 +244,10 @@ checkHEAD = function (host, URL, r, retry)
244 end 244 end
245 l = h.location 245 l = h.location
246 if nil ~= l then 246 if nil ~= l then
247 if testing("Protocol") and (pu.scheme ~= PU.scheme) then 247 pu = url.parse(l, defaultURL)
248 W(" protocol changed during redirect! " .. check .. " " .. host .. " -> " .. URL .. " -> " .. l) 248 if (pu.scheme ~= PU.scheme) then
249 if testing("Protocol") then W(" protocol changed during redirect! " .. check .. " " .. host .. " -> " .. URL .. " -> " .. l) end
250 if (pu.host == host) and pu.path == PU.path then D("Not testing protocol change " .. URL .. " -> " .. l); return end
249 end 251 end
250 252
251 if l == URL then 253 if l == URL then