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