]> git.saurik.com Git - apt.git/commitdiff
* methods/https.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 17 Nov 2009 15:51:31 +0000 (09:51 -0600)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 17 Nov 2009 15:51:31 +0000 (09:51 -0600)
  - fix incorrect use of CURLOPT_TIMEOUT, closes: #497983, LP: #354972
    thanks to Brian Thomason for the patch

debian/changelog
methods/https.cc

index 15b6eb1062b884950110300848a45117e0f2f500..417cd2436da6dbdeb6668d1158716d36c0219769 100644 (file)
@@ -9,6 +9,9 @@ apt (0.7.22.4) unstable; urgency=low
   * apt-pkg/packagemanager.cc:
     - add output about pre-depends configuring when debug::pkgPackageManager
       is used
+  * methods/https.cc:
+    - fix incorrect use of CURLOPT_TIMEOUT, closes: #497983, LP: #354972
+      thanks to Brian Thomason for the patch
 
   [ Brian Murray ]
   * apt-pkg/depcache.cc, apt-pkg/indexcopy.cc:
index 37d93e308dcf11452b0685432317d2d2699c5287..3cbb0088ac7960a184a738fcf193200aa9c21965 100644 (file)
@@ -212,8 +212,11 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
 
    // set timeout
    int timeout = _config->FindI("Acquire::http::Timeout",120);
-   curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
    curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, timeout);
+   //set really low lowspeed timeout (see #497983)
+   int dlMin = 1;
+   curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, dlMin);
+   curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, timeout);
 
    // set redirect options and default to 10 redirects
    bool AllowRedirect = _config->FindI("Acquire::https::AllowRedirect", true);