summaryrefslogtreecommitdiff
path: root/methods/https.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2009-04-09 04:36:34 +0200
committerMichael Vogt <mvo@debian.org>2009-04-09 04:36:34 +0200
commit09fab2442c2ab9a503841d3dcd56b3c0c3efb502 (patch)
tree7473091ab3ea6685e2244fdddec31d79ebfe3fd7 /methods/https.cc
parenta06f61bbb328ee218afbd367248f6f2338186e19 (diff)
* apt-pkg/contrib/strutl.cc:
- fix TimeToStr i18n (LP: #289807) * [ABI break] merge support for http redirects, thanks to Jeff Licquia and Anthony Towns * [ABI break] use int for the package IDs (thanks to Steve Cotton) * apt-pkg/pkgcache.cc: - do not run "dpkg --configure pkg" if pkg is in trigger-awaited state (LP: #322955) * methods/https.cc: - add Acquire::https::AllowRedirect support * Clarify the --help for 'purge' (LP: #243948) * cmdline/apt-get.cc - fix "apt-get source pkg" if there is a binary package and a source package of the same name but from different packages (LP: #330103) * cmdline/acqprogress.cc: - Call pkgAcquireStatus::Pulse even if quiet, so that we still get dlstatus messages on the status-fd (LP: #290234).
Diffstat (limited to 'methods/https.cc')
-rw-r--r--methods/https.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/methods/https.cc b/methods/https.cc
index 98dfeefa1..8bf44b52a 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -208,6 +208,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);
@@ -248,7 +253,6 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
// cleanup
if(success != 0)
{
- unlink(File->Name().c_str());
_error->Error("%s", curl_errorstr);
Fail();
return true;