summaryrefslogtreecommitdiff
path: root/methods/https.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2009-12-11 00:32:01 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2009-12-11 00:32:01 +0100
commit9f542bae2b3620887345ebc3e61970f8903123a0 (patch)
treef6bd11f0c9e3e32914c86d02592ab642961ec6ab /methods/https.cc
parentbb1293d975294884a95b9cb298432c9cf9ecc995 (diff)
add config setting for User-Agent in http and https to the Acquire group,
thanks Timothy J. Miller! (Closes: #355782)
Diffstat (limited to 'methods/https.cc')
-rw-r--r--methods/https.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/methods/https.cc b/methods/https.cc
index 86d7f3a6b..a4f39c379 100644
--- a/methods/https.cc
+++ b/methods/https.cc
@@ -211,7 +211,10 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, dlLimit);
// set header
- curl_easy_setopt(curl, CURLOPT_USERAGENT,"Debian APT-CURL/1.0 ("VERSION")");
+ curl_easy_setopt(curl, CURLOPT_USERAGENT,
+ _config->Find("Acquire::https::User-Agent",
+ _config->Find("Acquire::http::User-Agent",
+ "Debian APT-CURL/1.0 ("VERSION")")));
// set timeout
int timeout = _config->FindI("Acquire::http::Timeout",120);