Index: drush_make.download.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush_make/Attic/drush_make.download.inc,v
retrieving revision 1.1.2.30
diff -u -p -r1.1.2.30 drush_make.download.inc
--- drush_make.download.inc	15 Feb 2010 06:42:21 -0000	1.1.2.30
+++ drush_make.download.inc	26 Mar 2010 23:57:28 -0000
@@ -168,11 +168,24 @@ class DrushMakeDownload_Get extends Drus
     $filename = dt('file');
     if (!empty($this->project->download['url'])) {
       $url = $this->project->download['url'];
-      $filename = "$tmp_path/" . basename($url);
-      // Download the project -- try wget, fall back to curl.
-      if (drush_get_context('DRUSH_SIMULATE') || drush_shell_exec('wget %s -O %s', $url, $filename) || drush_shell_exec('curl -o %s %s', $filename, $url)) {
-        drush_log(dt('%project downloaded from %url.', array('%project' => $name, '%url' => $url)), 'ok');
-        return $filename;
+      $filetype = $this->project->download['filetype'];
+      $filename = (empty($filetype)) ? "$tmp_path/" . basename($url) : "$tmp_path/" . basename($url) . ".$filetype";
+      $postdata = $this->project->download['postdata'];
+      $wget = (!empty($postdata)) ? 'wget --post-data=%s %s -O %s' : 'wget %s -O %s';
+      $curl = (!empty($postdata)) ? 'curl -d "%s" -o %s %s' : 'curl -o %s %s';
+      if (!empty($postdata)) {
+        // Download the project -- try wget, fall back to curl.
+        if (drush_get_context('DRUSH_SIMULATE') || drush_shell_exec($wget, $postdata, $url, $filename) || drush_shell_exec($curl, $postdata, $filename, $url)) {
+          drush_log(dt('%project downloaded from %url.', array('%project' => $name, '%url' => $url)), 'ok');
+          return $filename;
+        }
+      }
+      else {
+        // Download the project -- try wget, fall back to curl.
+        if (drush_get_context('DRUSH_SIMULATE') || drush_shell_exec($wget, $url, $filename) || drush_shell_exec($curl, $filename, $url)) {
+          drush_log(dt('%project downloaded from %url.', array('%project' => $name, '%url' => $url)), 'ok');
+          return $filename;
+        }
       }
     }
     else {
