From ad77f760cf8223548cd214b361591dfde5443dea Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 11 Nov 2003 14:30:43 +0000 Subject: Added CURLOPT_NETRC_FILE. --- lib/url.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index 5da898c59..6b0d19170 100644 --- a/lib/url.c +++ b/lib/url.c @@ -507,6 +507,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...) */ data->set.use_netrc = va_arg(param, long); break; + case CURLOPT_NETRC_FILE: + /* + * Use this file instead of the $HOME/.netrc file + */ + data->set.netrc_file = va_arg(param, char *); + break; case CURLOPT_FOLLOWLOCATION: /* * Follow Location: header hints on a HTTP-server. @@ -2758,7 +2764,8 @@ static CURLcode CreateConnection(struct SessionHandle *data, if (data->set.use_netrc != CURL_NETRC_IGNORED) { if(Curl_parsenetrc(conn->hostname, - user, passwd)) { + user, passwd, + data->set.netrc_file)) { infof(data, "Couldn't find host %s in the .netrc file, using defaults", conn->hostname); } -- cgit v1.2.3