xref: /aosp_15_r20/external/curl/tests/data/test1104 (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 Workercookies
8*6236dae4SAndroid Build Coastguard Worker</keywords>
9*6236dae4SAndroid Build Coastguard Worker</info>
10*6236dae4SAndroid Build Coastguard Worker
11*6236dae4SAndroid Build Coastguard Worker# Server-side
12*6236dae4SAndroid Build Coastguard Worker<reply>
13*6236dae4SAndroid Build Coastguard Worker<data>
14*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 301 Moved
15*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
16*6236dae4SAndroid Build Coastguard WorkerLocation: /want/data/%TESTNUMBER0002
17*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
18*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test=true; domain=127.0.0.1; path=/; expires=Thu Jan  1 00:00:00 GMT 1970;
19*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test2=true; domain=127.0.0.1; path=/; expires=Fri Feb 13 11:56:27 GMT 2525;
20*6236dae4SAndroid Build Coastguard WorkerConnection: close
21*6236dae4SAndroid Build Coastguard Worker
22*6236dae4SAndroid Build Coastguard WorkerThis server reply is for testing a set-cookie
23*6236dae4SAndroid Build Coastguard Worker
24*6236dae4SAndroid Build Coastguard Worker</data>
25*6236dae4SAndroid Build Coastguard Worker<data2>
26*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 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 WorkerContent-Length: 52
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<datacheck>
35*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 301 Moved
36*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
37*6236dae4SAndroid Build Coastguard WorkerLocation: /want/data/%TESTNUMBER0002
38*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
39*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test=true; domain=127.0.0.1; path=/; expires=Thu Jan  1 00:00:00 GMT 1970;
40*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test2=true; domain=127.0.0.1; path=/; expires=Fri Feb 13 11:56:27 GMT 2525;
41*6236dae4SAndroid Build Coastguard WorkerConnection: close
42*6236dae4SAndroid Build Coastguard Worker
43*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 Followed here fine swsclose
44*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
45*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
46*6236dae4SAndroid Build Coastguard WorkerContent-Length: 52
47*6236dae4SAndroid Build Coastguard Worker
48*6236dae4SAndroid Build Coastguard WorkerIf this is received, the location following worked
49*6236dae4SAndroid Build Coastguard Worker
50*6236dae4SAndroid Build Coastguard Worker</datacheck>
51*6236dae4SAndroid Build Coastguard Worker</reply>
52*6236dae4SAndroid Build Coastguard Worker
53*6236dae4SAndroid Build Coastguard Worker# Client-side
54*6236dae4SAndroid Build Coastguard Worker<client>
55*6236dae4SAndroid Build Coastguard Worker<server>
56*6236dae4SAndroid Build Coastguard Workerhttp
57*6236dae4SAndroid Build Coastguard Worker</server>
58*6236dae4SAndroid Build Coastguard Worker<name>
59*6236dae4SAndroid Build Coastguard WorkerHTTP cookie expiry date at Jan 1 00:00:00 GMT 1970
60*6236dae4SAndroid Build Coastguard Worker</name>
61*6236dae4SAndroid Build Coastguard Worker<command>
62*6236dae4SAndroid Build Coastguard Workerhttp://%HOSTIP:%HTTPPORT/want/%TESTNUMBER -L -x %HOSTIP:%HTTPPORT -c %LOGDIR/cookies%TESTNUMBER.jar
63*6236dae4SAndroid Build Coastguard Worker</command>
64*6236dae4SAndroid Build Coastguard Worker<features>
65*6236dae4SAndroid Build Coastguard Workercookies
66*6236dae4SAndroid Build Coastguard Workerproxy
67*6236dae4SAndroid Build Coastguard Worker</features>
68*6236dae4SAndroid Build Coastguard Worker</client>
69*6236dae4SAndroid Build Coastguard Worker
70*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot"
71*6236dae4SAndroid Build Coastguard Worker<verify>
72*6236dae4SAndroid Build Coastguard Worker<protocol>
73*6236dae4SAndroid Build Coastguard WorkerGET http://%HOSTIP:%HTTPPORT/want/%TESTNUMBER HTTP/1.1
74*6236dae4SAndroid Build Coastguard WorkerHost: %HOSTIP:%HTTPPORT
75*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
76*6236dae4SAndroid Build Coastguard WorkerAccept: */*
77*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive
78*6236dae4SAndroid Build Coastguard Worker
79*6236dae4SAndroid Build Coastguard WorkerGET http://%HOSTIP:%HTTPPORT/want/data/%TESTNUMBER0002 HTTP/1.1
80*6236dae4SAndroid Build Coastguard WorkerHost: %HOSTIP:%HTTPPORT
81*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
82*6236dae4SAndroid Build Coastguard WorkerAccept: */*
83*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive
84*6236dae4SAndroid Build Coastguard WorkerCookie: test2=true
85*6236dae4SAndroid Build Coastguard Worker
86*6236dae4SAndroid Build Coastguard Worker</protocol>
87*6236dae4SAndroid Build Coastguard Worker</verify>
88*6236dae4SAndroid Build Coastguard Worker</testcase>
89