From 3fc75e4dbe4e3e17921df8a970618519ff2da5f3 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 25 Feb 2021 22:40:17 +0000 Subject: Add https support --- modules/mga-mirrors/files/check_mirrors_status | 3 +++ 1 file changed, 3 insertions(+) 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'}) -- cgit v1.2.1