diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-02-03 14:10:36 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-02-03 14:10:36 +0100 |
commit | 668ce84da00041c65cae3957d2b49786efa34276 (patch) | |
tree | 21c1336b504b4e077187252af02a640b48ba21f5 /methods | |
parent | d24ddc3008473562ca6dc8d9e6a2f2b790fbe5ce (diff) |
* methods/https.cc:
- add Acquire::https::AllowRedirect support
Diffstat (limited to 'methods')
-rw-r--r-- | methods/https.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/methods/https.cc b/methods/https.cc index 7c743a424..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); |