From 48be87e5f0bdf307481c44988f7f4123afbb1da7 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 9 Apr 2015 03:46:15 +0200 Subject: 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 ' tokens in the same file. See full description here: https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-File.html --- lib/netrc.c | 4 ++++ 1 file changed, 4 insertions(+) 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)) { -- cgit v1.2.3