xref: /curl/tests/data/test682 (revision 3fd80c7b)
1<testcase>
2<info>
3<keywords>
4HTTP
5netrc
6</keywords>
7</info>
8#
9# Server-side
10<reply>
11<data>
12HTTP/1.1 200 OK
13Date: Fri, 05 Aug 2022 10:09:00 GMT
14Server: test-server/fake
15Content-Type: text/plain
16Content-Length: 6
17Connection: close
18
19-foo-
20</data>
21</reply>
22
23#
24# Client-side
25<client>
26<server>
27http
28</server>
29<name>
30netrc with multiple logins - pick first
31</name>
32<command>
33--netrc-optional --netrc-file %LOGDIR/netrc%TESTNUMBER http://user1@%HOSTIP:%HTTPPORT/
34</command>
35<file name="%LOGDIR/netrc%TESTNUMBER" >
36machine %HOSTIP login user1 password passwd1
37machine %HOSTIP login user2 password passwd2
38</file>
39</client>
40
41#
42# Verify data after the test has been "shot"
43<verify>
44<protocol>
45GET / HTTP/1.1
46Host: %HOSTIP:%HTTPPORT
47Authorization: Basic %b64[user1:passwd1]b64%
48User-Agent: curl/%VERSION
49Accept: */*
50
51</protocol>
52</verify>
53</testcase>
54