diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-11-11 14:30:43 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-11-11 14:30:43 +0000 |
commit | ad77f760cf8223548cd214b361591dfde5443dea (patch) | |
tree | 6efd99947655e198069938590638e538ca10886d /lib/url.c | |
parent | a50d2a45d72bc4c9178315e52c48072f0f9e3d72 (diff) |
Added CURLOPT_NETRC_FILE.
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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); } |