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