Git init
[external/curl.git] / tests / data / test31
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 cookies
7 cookiejar
8 </keywords>
9 </info>
10 # Server-side
11 <reply>
12 <data>
13 HTTP/1.1 200 OK\r
14 Date: Thu, 09 Nov 2010 14:49:00 GMT\r
15 Server: test-server/fake\r
16 Content-Length: 4\r
17 Content-Type: text/html\r
18 Funny-head: yesyes\r
19 Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure\r
20 Set-Cookie:ismatch=this  ; domain=127.0.0.1; path=/silly/\r
21 Set-Cookie: partmatch=present; domain=127.0.0.1 ; path=/;\r
22 Set-Cookie:eat=this; domain=moo.foo.moo;\r
23 Set-Cookie: eat=this-too; domain=.foo.moo;\r
24 Set-Cookie: nodomainnovalue\r
25 Set-Cookie:   nodomain=value; expires=Fri Feb 2 11:56:27 GMT 2035\r
26 Set-Cookie: novalue; domain=reallysilly\r
27 Set-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030\r
28 Set-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030\r
29 Set-Cookie: magic=yessir; path=/silly/; HttpOnly\r
30 Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad;
31 \r
32 boo
33 </data>
34 </reply>
35
36 # Client-side
37 <client>
38 <server>
39 http
40 </server>
41  <name>
42 HTTP with weirdly formatted cookies and cookiejar storage
43  </name>
44 # Explicitly set the time zone to a known good one, in case the user is
45 # using one of the 'right' zones that take into account leap seconds
46 # which causes the cookie expiry times to be different.
47 <setenv>
48 TZ=GMT
49 </setenv>
50  <command>
51 http://%HOSTIP:%HTTPPORT/we/want/31 -b none -c log/jar31.txt
52 </command>
53 </client>
54
55 # Verify data after the test has been "shot"
56 <verify>
57 <strip>
58 ^User-Agent:.*
59 </strip>
60 <protocol>
61 GET /we/want/31 HTTP/1.1\r
62 Host: %HOSTIP:%HTTPPORT\r
63 Accept: */*\r
64 \r
65 </protocol>
66 <file name="log/jar31.txt" mode="text">
67 # Netscape HTTP Cookie File
68 # http://curl.haxx.se/rfc/cookie_spec.html
69 # This file was generated by libcurl! Edit at your own risk.
70
71 .127.0.0.1      TRUE    /silly/ FALSE   0       ismatch this
72 .127.0.0.1      TRUE    /       FALSE   0       partmatch       present
73 127.0.0.1       FALSE   /we/want/       FALSE   2054030187      nodomain        value
74 #HttpOnly_127.0.0.1     FALSE   /silly/ FALSE   0       magic   yessir
75 .0.0.1  TRUE    /we/want/       FALSE   0       blexp   yesyes
76 </file>
77 </verify>
78 </testcase>