Skip to content

Instantly share code, notes, and snippets.

@bartfeenstra
Created October 27, 2015 09:51
Show Gist options
  • Save bartfeenstra/f17c8a6c826e13bf63d6 to your computer and use it in GitHub Desktop.
Save bartfeenstra/f17c8a6c826e13bf63d6 to your computer and use it in GitHub Desktop.
diff --git a/includes/drush.inc b/includes/drush.inc
index b59d29c..e1244d6 100644
--- a/includes/drush.inc
+++ b/includes/drush.inc
@@ -836,12 +836,12 @@ function _drush_download_file($url, $destination, $overwrite = TRUE) {
}
$destination_tmp = drush_tempnam('download_file');
- if ($use_wget) {
+ if ($use_wget && FALSE) {
drush_shell_exec("wget -q --timeout=30 -O %s %s", $destination_tmp, $url);
}
else {
// Force TLS1+ as per https://github.com/drush-ops/drush/issues/894.
- drush_shell_exec("curl --tlsv1 --fail -s -L --connect-timeout 30 -o %s %s", $destination_tmp, $url);
+ drush_shell_exec("curl --compressed --tlsv1 --fail -s -L --connect-timeout 30 -o %s %s", $destination_tmp, $url);
}
if (!drush_file_not_empty($destination_tmp) && $file = @file_get_contents($url)) {
@file_put_contents($destination_tmp, $file);
@jerbob92
Copy link

Fix for wget:

wget --header="accept-encoding: gzip" -q --timeout=30 -O %s %s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment