diff options
| author | Martin Schimandl | 2017-12-04 19:32:22 +0100 |
|---|---|---|
| committer | Martin Schimandl | 2017-12-05 06:13:09 +0100 |
| commit | b1328adaa9030a3a7ed6127fe0662b0ae51f270b (patch) | |
| tree | 6bb6efe8e77ba7eeb84d1ed5aaa1ca48c99e022b /Library | |
| parent | 0db069602ec160736e150064894b5e33fefa2373 (diff) | |
| download | brew-b1328adaa9030a3a7ed6127fe0662b0ae51f270b.tar.bz2 | |
Use cask.url.user_agent when available
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/audit.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/audit.rb b/Library/Homebrew/cask/lib/hbc/audit.rb index 274a01ae2..d53d26ffc 100644 --- a/Library/Homebrew/cask/lib/hbc/audit.rb +++ b/Library/Homebrew/cask/lib/hbc/audit.rb @@ -278,13 +278,13 @@ module Hbc end def check_https_availability - check_url_for_https_availability(cask.url) unless cask.url.to_s.empty? + check_url_for_https_availability(cask.url, user_agents: [cask.url.user_agent]) unless cask.url.to_s.empty? check_url_for_https_availability(cask.appcast) unless cask.appcast.to_s.empty? check_url_for_https_availability(cask.homepage) unless cask.homepage.to_s.empty? end - def check_url_for_https_availability(url_to_check) - problem = curl_check_http_content(url_to_check.to_s) + def check_url_for_https_availability(url_to_check, user_agents: [:default]) + problem = curl_check_http_content(url_to_check.to_s, user_agents: user_agents) add_error problem unless problem.nil? end |
