Add support for the :ssl3 download-strategy.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
db8e8c780e
commit
008476940f
@ -199,6 +199,13 @@ class CurlPostDownloadStrategy < CurlDownloadStrategy
|
|||||||
end
|
end
|
||||||
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.
|
# Use this strategy to download but not unzip a file.
|
||||||
# Useful for installing jars.
|
# Useful for installing jars.
|
||||||
class NoUnzipCurlDownloadStrategy < CurlDownloadStrategy
|
class NoUnzipCurlDownloadStrategy < CurlDownloadStrategy
|
||||||
@ -745,6 +752,7 @@ class DownloadStrategyDetector
|
|||||||
when :nounzip then NoUnzipCurlDownloadStrategy
|
when :nounzip then NoUnzipCurlDownloadStrategy
|
||||||
when :post then CurlPostDownloadStrategy
|
when :post then CurlPostDownloadStrategy
|
||||||
when :svn then SubversionDownloadStrategy
|
when :svn then SubversionDownloadStrategy
|
||||||
|
when :ssl3 then CurlSSL3DownloadStrategy
|
||||||
else
|
else
|
||||||
raise "Unknown download strategy #{strategy} was requested."
|
raise "Unknown download strategy #{strategy} was requested."
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user