X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/4494239cc6d519b0b6219387ecd684b42b5c2d79..a1af1f3b1b7700d1108ee7648bce7b9d2c2c506b:/methods/http.cc?ds=sidebyside 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 #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; @@ -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";