Add followlocation (still need a custom Lime API for networking instead though)

This commit is contained in:
Joshua Granick
2015-11-01 07:54:08 -08:00
parent 573db646a3
commit d88709de2e

View File

@@ -327,18 +327,20 @@ class URLLoader {
headers.push('${requestHeader.name}: ${requestHeader.value}');
}
CURLEasy.setopt (__curl, FOLLOWLOCATION, true);
CURLEasy.setopt (__curl, AUTOREFERER, true);
CURLEasy.setopt(__curl, HTTPHEADER, headers);
CURLEasy.setopt(__curl, PROGRESSFUNCTION, progressFunction);
CURLEasy.setopt(__curl, WRITEFUNCTION, writeFunction);
CURLEasy.setopt(__curl, HEADERFUNCTION, headerFunction);
CURLEasy.setopt(__curl, SSL_VERIFYPEER, false);
CURLEasy.setopt(__curl, SSL_VERIFYHOST, false);
CURLEasy.setopt(__curl, USERAGENT, "libcurl-agent/1.0");
CURLEasy.setopt(__curl, CONNECTTIMEOUT, 30);
CURLEasy.setopt (__curl, SSL_VERIFYHOST, 0);
CURLEasy.setopt (__curl, USERAGENT, "libcurl-agent/1.0");
CURLEasy.setopt (__curl, CONNECTTIMEOUT, 30);
CURLEasy.setopt (__curl, TRANSFERTEXT, dataFormat == BINARY ? 0 : 1);
var result = CURLEasy.perform(__curl);