From 592b78001c381f9cca6f20d8d1d47696bb98c0d1 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 16 Oct 2009 15:36:28 +0200 Subject: port netrc support from maemon --- methods/https.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'methods/https.cc') diff --git a/methods/https.cc b/methods/https.cc index 37d93e308..a86c78029 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -126,6 +127,8 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_reset(curl); SetupProxy(); + maybe_add_auth (Uri, _config->FindFile("Dir::ETc::netrc")); + // callbacks curl_easy_setopt(curl, CURLOPT_URL, Itm->Uri.c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); -- cgit v1.2.3 From 1de1f70383ea2d44147ccaceff280fd70faf4c81 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 16 Oct 2009 15:42:05 +0200 Subject: add maybe_add_auth for ftp as well --- methods/https.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'methods/https.cc') diff --git a/methods/https.cc b/methods/https.cc index a86c78029..075d655b7 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -127,7 +127,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_reset(curl); SetupProxy(); - maybe_add_auth (Uri, _config->FindFile("Dir::ETc::netrc")); + maybe_add_auth (Uri, _config->FindFile("Dir::Etc::netrc")); // callbacks curl_easy_setopt(curl, CURLOPT_URL, Itm->Uri.c_str()); -- cgit v1.2.3 From 01fc89305c7b5fc52d719c6898a9fdf03abf3ce6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 4 Dec 2009 10:22:56 +0100 Subject: * apt-pkg/contrib/netrc.cc: - check for hostname and then host+path - better debug output * methods/https.cc: - fix bug in netrc integration --- methods/https.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'methods/https.cc') diff --git a/methods/https.cc b/methods/https.cc index 075d655b7..585e13848 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -130,7 +130,7 @@ bool HttpsMethod::Fetch(FetchItem *Itm) maybe_add_auth (Uri, _config->FindFile("Dir::Etc::netrc")); // callbacks - curl_easy_setopt(curl, CURLOPT_URL, Itm->Uri.c_str()); + curl_easy_setopt(curl, CURLOPT_URL, static_cast(Uri).c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); curl_easy_setopt(curl, CURLOPT_WRITEDATA, this); curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback); -- cgit v1.2.3