mirror of https://github.com/apache/jclouds.git
Update scriptbuilder/src/main/java/org/jclouds/scriptbuilder/domain/UnzipHttpResponseIntoDirectory.java
The CURL option "-L" should be used here in order to allow CURL to follow HTTP redirects. Without this option, this statement will not allow to download an archive from e.g. sourceforge.org. The class "SaveHttpResponseTo" uses the "-L" option as well.
This commit is contained in:
parent
9f95ff1476
commit
6a2a3c365f
|
@ -47,7 +47,7 @@ public class UnzipHttpResponseIntoDirectory extends InterpretableStatement {
|
|||
public UnzipHttpResponseIntoDirectory(String method, URI endpoint, Multimap<String, String> headers, String dir) {
|
||||
super(
|
||||
format(
|
||||
"({md} %s &&{cd} %s &&curl -X %s -s --retry 20 %s %s >extract.zip && unzip -o -qq extract.zip&& rm extract.zip)\n",
|
||||
"({md} %s &&{cd} %s &&curl -X -L %s -s --retry 20 %s %s >extract.zip && unzip -o -qq extract.zip&& rm extract.zip)\n",
|
||||
dir, dir, method, Joiner.on(' ').join(
|
||||
transform(headers.entries(), new Function<Entry<String, String>, String>() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue