1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6cookies
7cookiejar
8HTTP replaced headers
9httponly
10</keywords>
11</info>
12# Server-side
13<reply>
14<data>
15HTTP/1.1 200 OK
16Date: Thu, 09 Nov 2010 14:49:00 GMT
17Server: test-server/fake
18Content-Type: text/html
19Funny-head: yesyes
20Set-Cookie: test=yes; httponly; domain=foo.com; expires=Fri Feb 2 11:56:27 GMT 2035
21SET-COOKIE: test2=yes; domain=host.foo.com; expires=Fri Feb 2 11:56:27 GMT 2035
22Set-Cookie: test3=maybe; domain=foo.com; path=/moo; secure
23Set-Cookie: test4=no; domain=nope.foo.com; path=/moo; secure
24Set-Cookie: test5=name; domain=anything.com; path=/ ; secure
25Set-Cookie: fake=fooledyou; domain=..com; path=/;
26Content-Length: 4
27
28boo
29</data>
30</reply>
31
32# Client-side
33<client>
34<server>
35http
36</server>
37 <name>
38HTTP with various cookies and custom Host:
39 </name>
40# Explicitly set the time zone to a known good one, in case the user is
41# using one of the 'right' zones that take into account leap seconds
42# which causes the cookie expiry times to be different.
43<setenv>
44TZ=GMT
45</setenv>
46 <command>
47http://%HOSTIP:%HTTPPORT/we/want/61 -c log/jar61.txt -H "Host: www.host.foo.com"
48</command>
49</client>
50
51# Verify data after the test has been "shot"
52<verify>
53<strip>
54^User-Agent:.*
55</strip>
56<protocol>
57GET /we/want/61 HTTP/1.1
58Accept: */*
59Host: www.host.foo.com
60
61</protocol>
62<file name="log/jar61.txt" mode="text">
63# Netscape HTTP Cookie File
64# http://curl.haxx.se/rfc/cookie_spec.html
65# This file was generated by libcurl! Edit at your own risk.
66
67#HttpOnly_.foo.com	TRUE	/we/want/	FALSE	2054030187	test	yes
68.host.foo.com	TRUE	/we/want/	FALSE	2054030187	test2	yes
69.foo.com	TRUE	/moo	TRUE	0	test3	maybe
70</file>
71</verify>
72</testcase>
73