]> git.saurik.com Git - apt.git/commitdiff
* methods/https.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Mon, 9 Feb 2009 13:36:36 +0000 (14:36 +0100)
committerMichael Vogt <michael.vogt@ubuntu.com>
Mon, 9 Feb 2009 13:36:36 +0000 (14:36 +0100)
  - add Acquire::https::AllowRedirect support

debian/changelog
doc/examples/configure-index
methods/https.cc

index 89848f31ca1909a1f68cfa39af9dac6ec653f756..23a0514f64dfc0cb35b98d224deb66d96b389f30 100644 (file)
@@ -32,6 +32,8 @@ apt (0.7.20.2ubuntu1) jaunty; urgency=low
   * cmdline/apt-get.cc:
     - default to "false" for the "APT::Get::Build-Dep-Automatic"
       option (follow debian here)
+  * methods/https.cc:
+    - add Acquire::https::AllowRedirect support
 
   [ Dereck Wonnacott ]
   * Clarify the --help for 'purge' (LP: #243948)
index 5cc6187a8df5a1cde88241e61bde453922ce5209..a3ccdded823252df6aba33ac558406dd9942148d 100644 (file)
@@ -136,7 +136,8 @@ Acquire
     Proxy::http.us.debian.org "DIRECT";  // Specific per-host setting
     Timeout "120";
     Pipeline-Depth "5";
-    
+    AllowRedirect  "true";
+
     // Cache Control. Note these do not work with Squid 2.0.2
     No-Cache "false";
     Max-Age "86400";     // 1 Day age on index files
@@ -153,7 +154,8 @@ Acquire
        Verify-Peer "false";
        SslCert "/etc/apt/some.pem";
         CaPath  "/etc/ssl/certs";
-        Verify-Host" "2";
+        Verify-Host" "true";
+        AllowRedirect  "true";
   };
 
   ftp
index 98dfeefa10ad638673580f07e985828d9094b11c..87de545898b528ef1cdcd8a2a519977beb49b5c6 100644 (file)
@@ -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);