summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrike Uhlig <u@451f.org>2016-11-01 16:19:58 +0100
committerUlrike Uhlig <u@451f.org>2016-11-01 16:19:58 +0100
commit66bff5a44677abf2028bbd8f95457cffa3d54758 (patch)
tree4dae12f9be9d7a786568da887320f8555fa3c7ed
parentb17fe88ffd6f76c1bc4d88c92ca96dfc74fae945 (diff)
parent5faf3f774e02bb9cb3745f151910753052ca190a (diff)
Merge remote-tracking branch 'origin/master'
-rw-r--r--tails-download-and-verify/lib/downloader.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/tails-download-and-verify/lib/downloader.js b/tails-download-and-verify/lib/downloader.js
index fda089d..bb88b10 100644
--- a/tails-download-and-verify/lib/downloader.js
+++ b/tails-download-and-verify/lib/downloader.js
@@ -142,13 +142,13 @@ function tryAnotherMirror(download, fallback_download_url_prefix=blob.fallback_d
return download;
}
-// Return the index if a given URL in the mirror list if the URL is an existing Tails mirror
-// or return false.
+// Return the index, in the mirror list, of the mirror corresponding to a given
+// URL, if one is found. Else, return false.
function compareUrlToMirrors(testurl, mirrors, url_suffix=blob.url_suffix) {
if (! testurl.endsWith(url_suffix)) {
throw new Error(`${testurl} must end with ${url_suffix}`);
}
- console.log("Tested URL to compare against mirrors: " + testurl);
+ console.log("Tested URL to compare against mirrors: " + testurl);
for (let m_url = 0; m_url < mirrors.length; m_url++) {
console.log("Mirror URL to compare against " + mirrors.mirrors[m_url].url_prefix + url_suffix);
if (mirrors.mirrors[m_url].url_prefix + url_suffix == testurl) {
@@ -379,8 +379,8 @@ function setup(contentURL) {
blob.mirrors = mirrors;
}
- // check if any of the mirror urls matches with download.source.url
- // if yes, reassign the matching url to blob.url so that we can continue the download.
+ // check if any of the mirror urls matches with curDownload.source.url
+ // if yes, assign curDownload.source.url to blob.url so that we can continue the download.
if (blob.mirrors) {
if (curDownload && compareUrlToMirrors(curDownload.source.url, blob.mirrors, blob.url_suffix) !== false) {
blob.url = curDownload.source.url;