xref: /aosp_15_r20/external/curl/tests/data/test329 (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 Workercookies
7*6236dae4SAndroid Build Coastguard Worker</keywords>
8*6236dae4SAndroid Build Coastguard Worker</info>
9*6236dae4SAndroid Build Coastguard Worker# Server-side
10*6236dae4SAndroid Build Coastguard Worker<reply>
11*6236dae4SAndroid Build Coastguard Worker<data>
12*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK
13*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT
14*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake
15*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html
16*6236dae4SAndroid Build Coastguard WorkerFunny-head: yesyes
17*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: testn1=yes; path=/we/want/; domain=.host.foo.com; Max-Age=-1;
18*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test=yes; path=/we/want/; domain=.host.foo.com; Max-Age=0;
19*6236dae4SAndroid Build Coastguard WorkerContent-Length: 4
20*6236dae4SAndroid Build Coastguard Worker
21*6236dae4SAndroid Build Coastguard Workerboo
22*6236dae4SAndroid Build Coastguard Worker</data>
23*6236dae4SAndroid Build Coastguard Worker<data2>
24*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK
25*6236dae4SAndroid Build Coastguard WorkerFunny-head: yesyes
26*6236dae4SAndroid Build Coastguard WorkerContent-Length: 4
27*6236dae4SAndroid Build Coastguard Worker
28*6236dae4SAndroid Build Coastguard Workermoo
29*6236dae4SAndroid Build Coastguard Worker</data2>
30*6236dae4SAndroid Build Coastguard Worker</reply>
31*6236dae4SAndroid Build Coastguard Worker
32*6236dae4SAndroid Build Coastguard Worker# Client-side
33*6236dae4SAndroid Build Coastguard Worker<client>
34*6236dae4SAndroid Build Coastguard Worker<file name="%LOGDIR/jar%TESTNUMBER.txt" mode="text">
35*6236dae4SAndroid Build Coastguard Worker.host.foo.com	TRUE	/we/want/	FALSE	22147483647	test	no
36*6236dae4SAndroid Build Coastguard Worker</file>
37*6236dae4SAndroid Build Coastguard Worker<file name="%LOGDIR/jar%TESTNUMBER-2.txt" mode="text">
38*6236dae4SAndroid Build Coastguard Worker.host.foo.com	TRUE	/we/want/	FALSE	22147483647	tester	yes
39*6236dae4SAndroid Build Coastguard Worker</file>
40*6236dae4SAndroid Build Coastguard Worker<server>
41*6236dae4SAndroid Build Coastguard Workerhttp
42*6236dae4SAndroid Build Coastguard Worker</server>
43*6236dae4SAndroid Build Coastguard Worker<name>
44*6236dae4SAndroid Build Coastguard WorkerHTTP cookie with Max-Age=0
45*6236dae4SAndroid Build Coastguard Worker</name>
46*6236dae4SAndroid Build Coastguard Worker# Explicitly set the time zone to a known good one, in case the user is
47*6236dae4SAndroid Build Coastguard Worker# using one of the 'right' zones that take into account leap seconds
48*6236dae4SAndroid Build Coastguard Worker# which causes the cookie expiry times to be different.
49*6236dae4SAndroid Build Coastguard Worker<setenv>
50*6236dae4SAndroid Build Coastguard WorkerTZ=GMT
51*6236dae4SAndroid Build Coastguard Worker</setenv>
52*6236dae4SAndroid Build Coastguard Worker<command>
53*6236dae4SAndroid Build Coastguard Workerhttp://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -b %LOGDIR/jar%TESTNUMBER.txt -b %LOGDIR/jar%TESTNUMBER-2.txt -H "Host: host.foo.com" http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER0002
54*6236dae4SAndroid Build Coastguard Worker</command>
55*6236dae4SAndroid Build Coastguard Worker<features>
56*6236dae4SAndroid Build Coastguard Workercookies
57*6236dae4SAndroid Build Coastguard Worker</features>
58*6236dae4SAndroid Build Coastguard Worker</client>
59*6236dae4SAndroid Build Coastguard Worker
60*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot"
61*6236dae4SAndroid Build Coastguard Worker<verify>
62*6236dae4SAndroid Build Coastguard Worker<protocol>
63*6236dae4SAndroid Build Coastguard WorkerGET /we/want/%TESTNUMBER HTTP/1.1
64*6236dae4SAndroid Build Coastguard WorkerHost: host.foo.com
65*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
66*6236dae4SAndroid Build Coastguard WorkerAccept: */*
67*6236dae4SAndroid Build Coastguard WorkerCookie: tester=yes; test=no
68*6236dae4SAndroid Build Coastguard Worker
69*6236dae4SAndroid Build Coastguard WorkerGET /we/want/%TESTNUMBER0002 HTTP/1.1
70*6236dae4SAndroid Build Coastguard WorkerHost: host.foo.com
71*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION
72*6236dae4SAndroid Build Coastguard WorkerAccept: */*
73*6236dae4SAndroid Build Coastguard WorkerCookie: tester=yes
74*6236dae4SAndroid Build Coastguard Worker
75*6236dae4SAndroid Build Coastguard Worker</protocol>
76*6236dae4SAndroid Build Coastguard Worker</verify>
77*6236dae4SAndroid Build Coastguard Worker</testcase>
78