diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2009-12-10 23:05:23 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2009-12-10 23:05:23 +0100 |
commit | f932cd7c75cd7b0da99c97064f8d112075ccd7f5 (patch) | |
tree | 6018c4ae9c4f4c3d2cd0abb8b3f0fb7b4094524b /methods/http.cc | |
parent | c6474fb6ff482b0457674986a82afab0a3749af2 (diff) | |
parent | 43be0ac4b37f3a82ae4a16e473c3d8e44637ce1b (diff) |
merge with lp:~mvo/apt/debian-sid : move all my ABI break changes
to the "new" 0.7.26 version
Diffstat (limited to 'methods/http.cc')
-rw-r--r-- | methods/http.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/methods/http.cc b/methods/http.cc index 8fcff0b5d..2dae87a02 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -29,6 +29,7 @@ #include <apt-pkg/acquire-method.h> #include <apt-pkg/error.h> #include <apt-pkg/hashes.h> +#include <apt-pkg/netrc.h> #include <sys/stat.h> #include <sys/time.h> @@ -42,6 +43,7 @@ #include <map> #include <apti18n.h> + // Internet stuff #include <netdb.h> @@ -49,7 +51,6 @@ #include "connect.h" #include "rfc2553emu.h" #include "http.h" - /*}}}*/ using namespace std; @@ -724,10 +725,12 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out) Req += string("Proxy-Authorization: Basic ") + Base64Encode(Proxy.User + ":" + Proxy.Password) + "\r\n"; + maybe_add_auth (Uri, _config->FindFile("Dir::Etc::netrc")); if (Uri.User.empty() == false || Uri.Password.empty() == false) + { Req += string("Authorization: Basic ") + Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n"; - + } Req += "User-Agent: " + _config->Find("Acquire::http::User-Agent", "Debian APT-HTTP/1.3 ("VERSION")") + "\r\n\r\n"; |