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:
parent
49726926c6
commit
48be87e5f0
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user