Created
September 8, 2013 00:09
-
-
Save 3ign0n/6480655 to your computer and use it in GitHub Desktop.
This patch tentatively resolves home brew issues such as
https://github.com/mxcl/homebrew/issues/22106
and enables homebrew to install applications hosted on the server with self-signed SSL certificate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb | |
index 7d0115c..e1631b9 100644 | |
--- a/Library/Homebrew/download_strategy.rb | |
+++ b/Library/Homebrew/download_strategy.rb | |
@@ -61,7 +61,7 @@ class CurlDownloadStrategy < AbstractDownloadStrategy | |
# Private method, can be overridden if needed. | |
def _fetch | |
- curl @url, '-C', downloaded_size, '-o', @temporary_path | |
+ curl '-k', @url, '-C', downloaded_size, '-o', @temporary_path | |
end | |
def fetch | |
@@ -186,7 +186,7 @@ class CurlApacheMirrorDownloadStrategy < CurlDownloadStrategy | |
url = mirrors.fetch('preferred') + mirrors.fetch('path_info') | |
ohai "Best Mirror #{url}" | |
- curl url, '-C', downloaded_size, '-o', @temporary_path | |
+ curl '-k', url, '-C', downloaded_size, '-o', @temporary_path | |
rescue IndexError, Utils::JSON::Error | |
raise "Couldn't determine mirror. Try again later." | |
end | |
@@ -197,14 +197,14 @@ end | |
class CurlPostDownloadStrategy < CurlDownloadStrategy | |
def _fetch | |
base_url,data = @url.split('?') | |
- curl base_url, '-d', data, '-C', downloaded_size, '-o', @temporary_path | |
+ curl '-k', base_url, '-d', data, '-C', downloaded_size, '-o', @temporary_path | |
end | |
end | |
# Download from an SSL3-only host. | |
class CurlSSL3DownloadStrategy < CurlDownloadStrategy | |
def _fetch | |
- curl @url, '-3', '-C', downloaded_size, '-o', @temporary_path | |
+ curl '-k', @url, '-3', '-C', downloaded_size, '-o', @temporary_path | |
end | |
end | |
@@ -221,7 +221,7 @@ end | |
# the formula. | |
class CurlUnsafeDownloadStrategy < CurlDownloadStrategy | |
def _fetch | |
- curl @url, '--insecure', '-C', downloaded_size, '-o', @temporary_path | |
+ curl '-k', @url, '--insecure', '-C', downloaded_size, '-o', @temporary_path | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment