xref: /aosp_15_r20/external/curl/tests/data/test257 (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker<testcase>
2*6236dae4SAndroid Build Coastguard Worker<info>
3*6236dae4SAndroid Build Coastguard Worker<keywords>
4*6236dae4SAndroid Build Coastguard WorkerHTTP
5*6236dae4SAndroid Build Coastguard WorkerHTTP GET
6*6236dae4SAndroid Build Coastguard WorkerHTTP proxy
7*6236dae4SAndroid Build Coastguard WorkerHTTP Basic auth
8*6236dae4SAndroid Build Coastguard Workerfollowlocation
9*6236dae4SAndroid Build Coastguard Workernetrc
10*6236dae4SAndroid Build Coastguard Worker</keywords>
11*6236dae4SAndroid Build Coastguard Worker</info>
12*6236dae4SAndroid Build Coastguard Worker
13*6236dae4SAndroid Build Coastguard Worker# Server-side
14*6236dae4SAndroid Build Coastguard Worker<reply>
15*6236dae4SAndroid Build Coastguard Worker<data>
16*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 301 This is a weirdo text message swsclose
17*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
18*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
19*6236dae4SAndroid Build Coastguard WorkerLocation: http://anotherone.com/%TESTNUMBER0002
20*6236dae4SAndroid Build Coastguard WorkerConnection: close
21*6236dae4SAndroid Build Coastguard Worker
22*6236dae4SAndroid Build Coastguard WorkerThis server reply is for testing a simple Location: following
23*6236dae4SAndroid Build Coastguard Worker
24*6236dae4SAndroid Build Coastguard Worker</data>
25*6236dae4SAndroid Build Coastguard Worker<data2>
26*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 302 Followed here fine swsclose
27*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
28*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
29*6236dae4SAndroid Build Coastguard WorkerLocation: http://athird.com/%TESTNUMBER0003
30*6236dae4SAndroid Build Coastguard Worker
31*6236dae4SAndroid Build Coastguard WorkerIf this is received, the location following worked
32*6236dae4SAndroid Build Coastguard Worker
33*6236dae4SAndroid Build Coastguard Worker</data2>
34*6236dae4SAndroid Build Coastguard Worker<data3>
35*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 Followed here fine swsclose
36*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
37*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
38*6236dae4SAndroid Build Coastguard WorkerContent-Length: 52
39*6236dae4SAndroid Build Coastguard Worker
40*6236dae4SAndroid Build Coastguard WorkerIf this is received, the location following worked
41*6236dae4SAndroid Build Coastguard Worker
42*6236dae4SAndroid Build Coastguard Worker</data3>
43*6236dae4SAndroid Build Coastguard Worker<datacheck>
44*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 301 This is a weirdo text message swsclose
45*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
46*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
47*6236dae4SAndroid Build Coastguard WorkerLocation: http://anotherone.com/%TESTNUMBER0002
48*6236dae4SAndroid Build Coastguard WorkerConnection: close
49*6236dae4SAndroid Build Coastguard Worker
50*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 302 Followed here fine swsclose
51*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
52*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
53*6236dae4SAndroid Build Coastguard WorkerLocation: http://athird.com/%TESTNUMBER0003
54*6236dae4SAndroid Build Coastguard Worker
55*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 Followed here fine swsclose
56*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
57*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
58*6236dae4SAndroid Build Coastguard WorkerContent-Length: 52
59*6236dae4SAndroid Build Coastguard Worker
60*6236dae4SAndroid Build Coastguard WorkerIf this is received, the location following worked
61*6236dae4SAndroid Build Coastguard Worker
62*6236dae4SAndroid Build Coastguard Worker</datacheck>
63*6236dae4SAndroid Build Coastguard Worker</reply>
64*6236dae4SAndroid Build Coastguard Worker
65*6236dae4SAndroid Build Coastguard Worker# Client-side
66*6236dae4SAndroid Build Coastguard Worker<client>
67*6236dae4SAndroid Build Coastguard Worker<server>
68*6236dae4SAndroid Build Coastguard Workerhttp
69*6236dae4SAndroid Build Coastguard Worker</server>
70*6236dae4SAndroid Build Coastguard Worker<name>
71*6236dae4SAndroid Build Coastguard WorkerHTTP Location: following with --netrc-optional
72*6236dae4SAndroid Build Coastguard Worker</name>
73*6236dae4SAndroid Build Coastguard Worker<command>
74*6236dae4SAndroid Build Coastguard Workerhttp://supersite.com/want/%TESTNUMBER -L -x http://%HOSTIP:%HTTPPORT --netrc-optional --netrc-file %LOGDIR/netrc%TESTNUMBER
75*6236dae4SAndroid Build Coastguard Worker</command>
76*6236dae4SAndroid Build Coastguard Worker<features>
77*6236dae4SAndroid Build Coastguard Workerproxy
78*6236dae4SAndroid Build Coastguard Worker</features>
79*6236dae4SAndroid Build Coastguard Worker# netrc auth for two out of three sites:
80*6236dae4SAndroid Build Coastguard Worker<file name="%LOGDIR/netrc%TESTNUMBER">
81*6236dae4SAndroid Build Coastguard Workermachine supersite.com login user1 password passwd1
82*6236dae4SAndroid Build Coastguard Workermachine anotherone.com login user2 password passwd2
83*6236dae4SAndroid Build Coastguard Worker</file>
84*6236dae4SAndroid Build Coastguard Worker</client>
85*6236dae4SAndroid Build Coastguard Worker
86*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot"
87*6236dae4SAndroid Build Coastguard Worker<verify>
88*6236dae4SAndroid Build Coastguard Worker<protocol>
89*6236dae4SAndroid Build Coastguard WorkerGET http://supersite.com/want/%TESTNUMBER HTTP/1.1
90*6236dae4SAndroid Build Coastguard WorkerHost: supersite.com
91*6236dae4SAndroid Build Coastguard WorkerAuthorization: Basic dXNlcjE6cGFzc3dkMQ==
92*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
93*6236dae4SAndroid Build Coastguard WorkerAccept: */*
94*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive
95*6236dae4SAndroid Build Coastguard Worker
96*6236dae4SAndroid Build Coastguard WorkerGET http://anotherone.com/%TESTNUMBER0002 HTTP/1.1
97*6236dae4SAndroid Build Coastguard WorkerHost: anotherone.com
98*6236dae4SAndroid Build Coastguard WorkerAuthorization: Basic dXNlcjI6cGFzc3dkMg==
99*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
100*6236dae4SAndroid Build Coastguard WorkerAccept: */*
101*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive
102*6236dae4SAndroid Build Coastguard Worker
103*6236dae4SAndroid Build Coastguard WorkerGET http://athird.com/%TESTNUMBER0003 HTTP/1.1
104*6236dae4SAndroid Build Coastguard WorkerHost: athird.com
105*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
106*6236dae4SAndroid Build Coastguard WorkerAccept: */*
107*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive
108*6236dae4SAndroid Build Coastguard Worker
109*6236dae4SAndroid Build Coastguard Worker</protocol>
110*6236dae4SAndroid Build Coastguard Worker</verify>
111*6236dae4SAndroid Build Coastguard Worker</testcase>
112