diff options
author | Viktor Szakats <vszakats@users.noreply.github.com> | 2015-04-09 03:46:15 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-04-24 23:57:37 +0200 |
commit | 48be87e5f0bdf307481c44988f7f4123afbb1da7 (patch) | |
tree | f1d8907b77c2f2229d6f0b9a79fff4758db9625d /lib | |
parent | 49726926c671a63f3fa8dfd109cc975a143d2b21 (diff) |
netrc: support 'default' token
The 'default' token has no argument and means to match _any_ domain.
It must be placed last if there are 'machine <name>' tokens in the same file.
See full description here:
https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-File.html
Diffstat (limited to 'lib')
-rw-r--r-- | lib/netrc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/netrc.c b/lib/netrc.c index 6271a3a2f..e656cf7c6 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -137,6 +137,10 @@ int Curl_parsenetrc(const char *host, 'password'. */ state=HOSTFOUND; } + else if(Curl_raw_equal("default", tok)) { + state=HOSTVALID; + retcode=0; /* we did find our host */ + } break; case HOSTFOUND: if(Curl_raw_equal(host, tok)) { |