Commit 48be87e5 authored by Viktor Szakats's avatar Viktor Szakats Committed by Daniel Stenberg
Browse files

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
parent 49726926
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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)) {