From 008476940f0fc4191657d3df8f80ae2866a87e81 Mon Sep 17 00:00:00 2001 From: Tijs Zwinkels - TinkerTank Date: Mon, 5 Aug 2013 07:04:15 +0100 Subject: Add support for the :ssl3 download-strategy. Signed-off-by: Adam Vandenberg --- Library/Homebrew/download_strategy.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library') diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 2d2fe1c28..17ee4143f 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -199,6 +199,13 @@ class CurlPostDownloadStrategy < CurlDownloadStrategy end end +# Download from an SSL3-only host. +class CurlSSL3DownloadStrategy < CurlDownloadStrategy + def _fetch + curl @url, '-3', '-C', downloaded_size, '-o', @temporary_path + end +end + # Use this strategy to download but not unzip a file. # Useful for installing jars. class NoUnzipCurlDownloadStrategy < CurlDownloadStrategy @@ -745,6 +752,7 @@ class DownloadStrategyDetector when :nounzip then NoUnzipCurlDownloadStrategy when :post then CurlPostDownloadStrategy when :svn then SubversionDownloadStrategy + when :ssl3 then CurlSSL3DownloadStrategy else raise "Unknown download strategy #{strategy} was requested." end -- cgit v1.2.3