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:
Phillip Kroll 2012-11-22 18:38:39 +01:00
parent 9f95ff1476
commit 6a2a3c365f
1 changed files with 1 additions and 1 deletions

View File

@ -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>() {