xref: /curl/tests/data/test479 (revision e9b9bbac)
1<testcase>
2<info>
3<keywords>
4netrc
5HTTP
6</keywords>
7</info>
8#
9# Server-side
10<reply>
11<data crlf="yes">
12HTTP/1.1 301 Follow this you fool
13Date: Tue, 09 Nov 2010 14:49:00 GMT
14Server: test-server/fake
15Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
16ETag: "21025-dc7-39462498"
17Accept-Ranges: bytes
18Content-Length: 6
19Connection: close
20Location: http://b.com/%TESTNUMBER0002
21
22-foo-
23</data>
24
25<data2 crlf="yes">
26HTTP/1.1 200 OK
27Date: Tue, 09 Nov 2010 14:49:00 GMT
28Server: test-server/fake
29Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
30ETag: "21025-dc7-39462498"
31Accept-Ranges: bytes
32Content-Length: 7
33Connection: close
34
35target
36</data2>
37
38<datacheck crlf="yes">
39HTTP/1.1 301 Follow this you fool
40Date: Tue, 09 Nov 2010 14:49:00 GMT
41Server: test-server/fake
42Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
43ETag: "21025-dc7-39462498"
44Accept-Ranges: bytes
45Content-Length: 6
46Connection: close
47Location: http://b.com/%TESTNUMBER0002
48
49HTTP/1.1 200 OK
50Date: Tue, 09 Nov 2010 14:49:00 GMT
51Server: test-server/fake
52Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
53ETag: "21025-dc7-39462498"
54Accept-Ranges: bytes
55Content-Length: 7
56Connection: close
57
58target
59</datacheck>
60</reply>
61
62#
63# Client-side
64<client>
65<server>
66http
67</server>
68<features>
69proxy
70</features>
71<name>
72.netrc with redirect and default without password
73</name>
74<command>
75--netrc --netrc-file %LOGDIR/netrc%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT/ http://a.com/
76</command>
77<file name="%LOGDIR/netrc%TESTNUMBER" >
78
79machine a.com
80  login alice
81  password alicespassword
82
83default
84  login bob
85
86</file>
87</client>
88
89<verify>
90<protocol>
91GET http://a.com/ HTTP/1.1
92Host: a.com
93Authorization: Basic %b64[alice:alicespassword]b64%
94User-Agent: curl/%VERSION
95Accept: */*
96Proxy-Connection: Keep-Alive
97
98GET http://b.com/%TESTNUMBER0002 HTTP/1.1
99Host: b.com
100Authorization: Basic %b64[bob:]b64%
101User-Agent: curl/%VERSION
102Accept: */*
103Proxy-Connection: Keep-Alive
104
105</protocol>
106</verify>
107</testcase>
108