summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/fetch_strategy.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index 38ed17d28e..40d8b00728 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -257,7 +257,7 @@ class URLFetchStrategy(FetchStrategy):
self.digest = kwargs[h]
self.expand_archive = kwargs.get('expand', True)
- self.extra_curl_options = kwargs.get('curl_options', [])
+ self.extra_options = kwargs.get('fetch_options', [])
self._curl = None
self.extension = kwargs.get('extension', None)
@@ -343,7 +343,12 @@ class URLFetchStrategy(FetchStrategy):
else:
curl_args.append('-sS') # just errors when not.
- curl_args += self.extra_curl_options
+ if self.extra_options:
+ cookie = self.extra_options.get('cookie')
+ if cookie:
+ curl_args.append('-j') # junk cookies
+ curl_args.append('-b') # specify cookie
+ curl_args.append(cookie)
# Run curl but grab the mime type from the http headers
curl = self.curl