summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2009-11-25 23:20:12 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2009-11-25 23:20:12 +0100
commit4494239cc6d519b0b6219387ecd684b42b5c2d79 (patch)
tree399f2f290cf2d6b4216efc481ddbd7d85674b2cb /methods/http.cc
parentd8c6a87aef1f76647d424c6b05641ac0ff53a6a8 (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/http.cc')
-rw-r--r--methods/http.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/methods/http.cc b/methods/http.cc
index 461a98406..8fcff0b5d 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -728,7 +728,8 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
Req += string("Authorization: Basic ") +
Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n";
- Req += "User-Agent: Debian APT-HTTP/1.3 ("VERSION")\r\n\r\n";
+ Req += "User-Agent: " + _config->Find("Acquire::http::User-Agent",
+ "Debian APT-HTTP/1.3 ("VERSION")") + "\r\n\r\n";
if (Debug == true)
cerr << Req << endl;