aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mga-mirrors
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2021-02-25 22:40:17 +0000
committerPascal Terjan <pterjan@mageia.org>2021-02-25 22:40:17 +0000
commit3fc75e4dbe4e3e17921df8a970618519ff2da5f3 (patch)
tree7aaa38e29511122d74bb7e3c4b03347c50057b67 /modules/mga-mirrors
parent087434982ec4b101c405feb8b7fcf751bce739a7 (diff)
downloadpuppet-3fc75e4dbe4e3e17921df8a970618519ff2da5f3.tar
puppet-3fc75e4dbe4e3e17921df8a970618519ff2da5f3.tar.gz
puppet-3fc75e4dbe4e3e17921df8a970618519ff2da5f3.tar.bz2
puppet-3fc75e4dbe4e3e17921df8a970618519ff2da5f3.tar.xz
puppet-3fc75e4dbe4e3e17921df8a970618519ff2da5f3.zip
Add https support
Diffstat (limited to 'modules/mga-mirrors')
-rwxr-xr-xmodules/mga-mirrors/files/check_mirrors_status3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/mga-mirrors/files/check_mirrors_status b/modules/mga-mirrors/files/check_mirrors_status
index 6d6eff61..b31d4da5 100755
--- a/modules/mga-mirrors/files/check_mirrors_status
+++ b/modules/mga-mirrors/files/check_mirrors_status
@@ -59,6 +59,9 @@ def fetch_url(url, redirect_limit = 3)
http = Net::HTTP.new(uri.host, uri.port)
http.open_timeout = 5
http.read_timeout = 5
+ if uri.scheme == 'https' then
+ http.use_ssl = true
+ end
# Ruby 1.8.7 doesn't set a default User-Agent which causes at
# least one mirror to return 403
response = http.get(uri.path, {'User-Agent' => 'check_mirrors'})