diff options
| author | onefang | 2019-12-02 21:32:24 +1000 |
|---|---|---|
| committer | onefang | 2019-12-02 21:32:24 +1000 |
| commit | 15dd5767386b3b051d499bef32a2655fb9a21a01 (patch) | |
| tree | 61a5d5062e51dfb4ce686219b922fbcb1f2e50fa | |
| parent | TODO+=2 (diff) | |
| download | apt-panopticon-15dd5767386b3b051d499bef32a2655fb9a21a01.zip apt-panopticon-15dd5767386b3b051d499bef32a2655fb9a21a01.tar.gz apt-panopticon-15dd5767386b3b051d499bef32a2655fb9a21a01.tar.bz2 apt-panopticon-15dd5767386b3b051d499bef32a2655fb9a21a01.tar.xz | |
Make it match test_rewrite.sh more.
Diffstat (limited to '')
| -rwxr-xr-x | apt-panopticon.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 5aaa858..ade9de3 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
| @@ -461,7 +461,8 @@ checkHEAD = function (host, URL, r, retry) | |||
| 461 | end | 461 | end |
| 462 | IP = '--connect-to "' .. pu.host .. '::' .. PU.host .. ':"' | 462 | IP = '--connect-to "' .. pu.host .. '::' .. PU.host .. ':"' |
| 463 | end | 463 | end |
| 464 | local cmd = 'ionice -c3 nice -n 19 curl -I --retry 0 -s --path-as-is --connect-timeout ' .. options.timeout.value .. ' --max-redirs 0 ' .. IP .. ' ' .. '-o /dev/null -D results/"HEADERS_' .. fname .. '" ' .. | 464 | local cmd = 'ionice -c3 nice -n 19 curl -I --retry 0 -s --path-as-is --connect-timeout ' .. options.timeout.value .. ' --max-redirs 0 ' .. |
| 465 | IP .. ' ' .. '-o /dev/null -D results/"HEADERS_' .. fname .. '" ' .. | ||
| 465 | hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' | 466 | hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' |
| 466 | local status, result = execute(cmd) | 467 | local status, result = execute(cmd) |
| 467 | os.execute('cat results/"HEADERS_' .. fname .. '" >>results/"STATUS_' .. fname .. '" 2>/dev/null; rm results/"HEADERS_' .. fname .. '" 2>/dev/null') | 468 | os.execute('cat results/"HEADERS_' .. fname .. '" >>results/"STATUS_' .. fname .. '" 2>/dev/null; rm results/"HEADERS_' .. fname .. '" 2>/dev/null') |
| @@ -711,7 +712,7 @@ local postDownload = function(host, r, k) | |||
| 711 | end | 712 | end |
| 712 | 713 | ||
| 713 | local downloadLock = "flock -n results/curl-" | 714 | local downloadLock = "flock -n results/curl-" |
| 714 | local download = "curl --connect-timeout " .. options.timeout.value .. " --create-dirs -L -z 'results/stamp.old' -v -R " | 715 | local download = "curl --connect-timeout " .. options.timeout.value .. " --create-dirs -f -L -z 'results/stamp.old' -v -R " |
| 715 | local downloads = function(host, URL, release, list) | 716 | local downloads = function(host, URL, release, list) |
| 716 | if nil == URL then URL = "" end | 717 | if nil == URL then URL = "" end |
| 717 | local lock = "%s-" .. host .. ".lock" | 718 | local lock = "%s-" .. host .. ".lock" |
