1
0
mirror of https://github.com/moparisthebest/curl synced 2025-02-28 09:21:50 -05:00

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
This commit is contained in:
Viktor Szakats 2015-04-09 03:46:15 +02:00 committed by Daniel Stenberg
parent 49726926c6
commit 48be87e5f0

View File

@ -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)) {