aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-11-11 14:30:43 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-11-11 14:30:43 +0000
commitad77f760cf8223548cd214b361591dfde5443dea (patch)
tree6efd99947655e198069938590638e538ca10886d /lib/url.c
parenta50d2a45d72bc4c9178315e52c48072f0f9e3d72 (diff)
Added CURLOPT_NETRC_FILE.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c9
1 files changed, 8 insertions, 1 deletions
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);
}