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

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

index 6dea85f258cc3017b2ecb7ac1e22196fbbfe1a22..c0da66973a51e01850d734a345464a73bbbc51e2 100644 (file)
@@ -41,6 +41,8 @@ apt (0.7.21) UNRELEASED; urgency=low
   * 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
 
   [ Dereck Wonnacott ]
   * apt-ftparchive might write corrupt Release files (LP: #46439)
index 84b1d8829198517697e7a25e8c8e611852671578..a4167085b7310d50d68fe6bdf2b33644c2bf4af4 100644 (file)
@@ -183,7 +183,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
@@ -200,7 +201,8 @@ Acquire
        Verify-Peer "false";
        SslCert "/etc/apt/some.pem";
         CaPath  "/etc/ssl/certs";
-        Verify-Host" "2";
+        Verify-Host" "true";
+        AllowRedirect  "true";
   };
 
   ftp
index 7c743a4246392482b0f7a0cbd3c42fa1c7bebc2f..8bf44b52a995b994f6ba252aa386d1d39d171859 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);