X-Git-Url: https://git.hcoop.net/ntk/apt.git/blobdiff_plain/364af2ef2aba2911b12379ec8b6e55874e4b0a31..592b78001c381f9cca6f20d8d1d47696bb98c0d1:/methods/http.cc diff --git a/methods/http.cc b/methods/http.cc index 1eba0f27..6bfe80ba 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -42,6 +43,7 @@ #include #include + // Internet stuff #include @@ -49,7 +51,6 @@ #include "connect.h" #include "rfc2553emu.h" #include "http.h" - /*}}}*/ using namespace std; @@ -725,9 +726,11 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out) Base64Encode(Proxy.User + ":" + Proxy.Password) + "\r\n"; if (Uri.User.empty() == false || Uri.Password.empty() == false) + { + maybe_add_auth (Uri, _config->FindFile("Dir::Etc::netrc")); Req += string("Authorization: Basic ") + Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n"; - + } Req += "User-Agent: Debian APT-HTTP/1.3 ("VERSION")\r\n\r\n"; if (Debug == true)