diff options
| author | Xu Cheng | 2015-06-21 16:21:39 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-06-22 21:24:57 +0800 |
| commit | 0276c3c70ce8d0e3d4550c8c496bae3b3539349d (patch) | |
| tree | 71167befe45c499a83c2cf9a64c9dff1da15d2f7 /Library | |
| parent | b36317540180957a97c9b40cd8f1e4bc647cb7b2 (diff) | |
| download | brew-0276c3c70ce8d0e3d4550c8c496bae3b3539349d.tar.bz2 | |
download_strategy: make sure the inspected url is used
Closes Homebrew/homebrew#40940.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 5407c77d5..5e27c4e0a 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -274,6 +274,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy urls = actual_urls unless urls.empty? ohai "Downloading from #{urls.last}" + @url = urls.last if !ENV["HOMEBREW_NO_INSECURE_REDIRECT"].nil? && @url.start_with?("https://") && urls.any? { |u| !u.start_with? "https://" } raise "HTTPS to HTTP redirect detected & HOMEBREW_NO_INSECURE_REDIRECT is set." |
