netrc: refactor into smaller sub functions

Fixes #20950 - test 685 is extended for this
Closes #20932
This commit is contained in:
Daniel Stenberg 2026-03-09 08:38:14 +01:00
parent a46816b4cb
commit a327a5bded
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 334 additions and 221 deletions

View file

@ -26,13 +26,15 @@ Connection: close
http
</server>
<name>
netrc with no login - provided user
netrc with no login - but provided user in URL
</name>
<command>
--netrc-optional --netrc-file %LOGDIR/netrc%TESTNUMBER http://user@%HOSTIP:%HTTPPORT/
</command>
<file name="%LOGDIR/netrc%TESTNUMBER" >
machine %HOSTIP password firstthis login unknown
machine %HOSTIP password 5up3r53cr37
machine %HOSTIP password d1ff3r3nt login anotherone
</file>
</client>