summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-11-17 09:51:31 -0600
committerMichael Vogt <michael.vogt@ubuntu.com>2009-11-17 09:51:31 -0600
commit43cf55db7c2ce7015d365556ed9ab0b8b2cec3ca (patch)
treed023a8fbc0a258145c01e5a203274ebd49719c29 /methods
parenta1e42d1fd8848cdcb853811b6974d77c66124d4b (diff)
* methods/https.cc:
- fix incorrect use of CURLOPT_TIMEOUT, closes: #497983, LP: #354972 thanks to Brian Thomason for the patch
Diffstat (limited to 'methods')
-rw-r--r--methods/https.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/methods/https.cc b/methods/https.cc
index 37d93e308..3cbb0088a 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);