From f855135128a2c544bcfb8409ba91f4c23bd4e618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Galv=C3=A3o?= Date: Sun, 29 Mar 2020 17:56:28 +0100 Subject: [PATCH] find-appcast: use curl for checking url (#79585) --- developer/bin/find-appcast | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/developer/bin/find-appcast b/developer/bin/find-appcast index 097a29b4d4..78239735c0 100755 --- a/developer/bin/find-appcast +++ b/developer/bin/find-appcast @@ -23,14 +23,9 @@ def verify_appcast(appcast_type, *urls) end def url_exist?(url) - uri = URI.parse(url) - response = Net::HTTP.get_response(uri) - response.is_a? Net::HTTPSuccess -rescue URI::InvalidURIError, - Errno::ECONNREFUSED, - SocketError, - OpenSSL::SSL::SSLError - false + return false unless url + + system('curl', '--silent', '--location', '--fail', url, out: File::NULL) end def find_sparkle(app)