summaryrefslogtreecommitdiff
path: root/methods/https.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-02-09 14:36:36 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2009-02-09 14:36:36 +0100
commit8872c430df84660fa994db0ebfa67861239fe739 (patch)
tree6327f67a727b019e5a6bcd6ffa3041b824e655ce /methods/https.cc
parent4bfb7a7756eed967c1edad63bc16a37b741cafaa (diff)
* methods/https.cc:
- add Acquire::https::AllowRedirect support
Diffstat (limited to 'methods/https.cc')
-rw-r--r--methods/https.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/methods/https.cc b/methods/https.cc
index 98dfeefa1..87de54589 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);