X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/788a8f42c1ec146c812550d076e5fb720e83ae52..b74d2d3af3238210bfafe57562d3670327918cd9:/methods/https.cc?ds=sidebyside diff --git a/methods/https.cc b/methods/https.cc index 728869fa2..37d93e308 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -215,6 +215,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, timeout); + // set redirect options and default to 10 redirects + bool AllowRedirect = _config->FindI("Acquire::https::AllowRedirect", true); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, AllowRedirect); + curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 10); + // debug if(_config->FindB("Debug::Acquire::https", false)) curl_easy_setopt(curl, CURLOPT_VERBOSE, true); @@ -255,7 +260,6 @@ bool HttpsMethod::Fetch(FetchItem *Itm) // cleanup if(success != 0) { - unlink(File->Name().c_str()); _error->Error("%s", curl_errorstr); Fail(); return true;