From 43cf55db7c2ce7015d365556ed9ab0b8b2cec3ca Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 17 Nov 2009 09:51:31 -0600 Subject: [PATCH] * methods/https.cc: - fix incorrect use of CURLOPT_TIMEOUT, closes: #497983, LP: #354972 thanks to Brian Thomason for the patch --- debian/changelog | 3 +++ methods/https.cc | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 15b6eb10..417cd243 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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: diff --git a/methods/https.cc b/methods/https.cc index 37d93e30..3cbb0088 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -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); -- 2.20.1