From befddfc3e6a1f61b0bb2b6c377f3a394a7620b81 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 11 Sep 2011 15:11:24 -0400 Subject: dload: provide optional netrc support if ~/.netrc exists and has credentials for the hostname requested in a download, they will be provided in an http auth request. This can still be overridden by explcitly declaring user:pass in the URL. Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- lib/libalpm/dload.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 4937f6ea..5ae02fc6 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -209,6 +209,7 @@ static void curl_set_handle_opts(struct dload_payload *payload, curl_easy_setopt(handle->curl, CURLOPT_LOW_SPEED_TIME, 10L); curl_easy_setopt(handle->curl, CURLOPT_HEADERFUNCTION, parse_headers); curl_easy_setopt(handle->curl, CURLOPT_WRITEHEADER, (void *)payload); + curl_easy_setopt(handle->curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL); _alpm_log(handle, ALPM_LOG_DEBUG, "url: %s\n", payload->fileurl); -- cgit v1.2.3-70-g09d2