aboutsummaryrefslogtreecommitdiff
path: root/tests/data/test506
blob: 84474cdc56208f6fe5369e35560c715840562d3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Server-side
<reply>
<data1>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Type: text/html
Set-Cookie: test1=one; domain=foo.com; expires=Tue Feb 1 11:56:27 GMT 2007
Set-Cookie: test2=two; domain=host.foo.com; expires=Tue Feb 1 11:56:27 GMT 2007
Set-Cookie: test3=three; domain=foo.com; expires=Tue Feb 1 11:56:27 GMT 2007
Content-Length: 29

run 1: set cookie 1, 2 and 3
</data1>
<data2>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:01 GMT
Server: test-server/fake
Content-Type: text/html
Set-Cookie: test4=four; domain=host.foo.com; expires=Tue Feb 1 11:56:27 GMT 2007
Set-Cookie: test5=five; domain=host.foo.com; expires=Tue Feb 1 11:56:27 GMT 2007
Content-Length: 26

run 2: set cookie 4 and 5
</data2>
<data3>
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:02 GMT
Server: test-server/fake
Content-Type: text/html
Funny-head: yesyes
Set-Cookie: test4=overwritten4; domain=host.foo.com; expires=Thu Dec 31 23:59:59 GMT 2009
Set-Cookie: test1=overwritten1; domain=foo.com; expires=Tue Feb 2 11:56:27 GMT 2007
Content-Type: text/html
Content-Length: 32

run 3: overwrite cookie 1 and 4
</data3>
</reply>

# Client-side
<client>
<server>
http
</server>
<name>
HTTP with shared cookie list (and dns cache)
</name>
<tool>
lib506
</tool>
<command>
http://%HOSTIP:%HTTPPORT/506
</command>
</client>

# Verify data after the test has been "shot"
<verify>
<stdout mode="text">
GLOBAL_INIT
SHARE_INIT
CURLSHOPT_LOCKFUNC
CURLSHOPT_UNLOCKFUNC
CURLSHOPT_USERDATA
CURL_LOCK_DATA_COOKIE
CURL_LOCK_DATA_DNS
*** run 1
CURLOPT_SHARE
lock:   share  <Pigs in space>: 0
unlock: share  <Pigs in space>: 1
PERFORM
lock:   dns    <Pigs in space>: 2
unlock: dns    <Pigs in space>: 3
lock:   dns    <Pigs in space>: 4
unlock: dns    <Pigs in space>: 5
lock:   cookie <Pigs in space>: 6
unlock: cookie <Pigs in space>: 7
lock:   cookie <Pigs in space>: 8
unlock: cookie <Pigs in space>: 9
lock:   cookie <Pigs in space>: 10
unlock: cookie <Pigs in space>: 11
lock:   cookie <Pigs in space>: 12
unlock: cookie <Pigs in space>: 13
run 1: set cookie 1, 2 and 3
lock:   dns    <Pigs in space>: 14
unlock: dns    <Pigs in space>: 15
CLEANUP
lock:   dns    <Pigs in space>: 16
unlock: dns    <Pigs in space>: 17
lock:   cookie <Pigs in space>: 18
unlock: cookie <Pigs in space>: 19
*** run 2
CURLOPT_SHARE
lock:   share  <Pigs in space>: 20
unlock: share  <Pigs in space>: 21
PERFORM
lock:   dns    <Pigs in space>: 22
unlock: dns    <Pigs in space>: 23
lock:   dns    <Pigs in space>: 24
unlock: dns    <Pigs in space>: 25
lock:   cookie <Pigs in space>: 26
unlock: cookie <Pigs in space>: 27
lock:   cookie <Pigs in space>: 28
unlock: cookie <Pigs in space>: 29
lock:   cookie <Pigs in space>: 30
unlock: cookie <Pigs in space>: 31
run 2: set cookie 4 and 5
lock:   dns    <Pigs in space>: 32
unlock: dns    <Pigs in space>: 33
CLEANUP
lock:   dns    <Pigs in space>: 34
unlock: dns    <Pigs in space>: 35
lock:   cookie <Pigs in space>: 36
unlock: cookie <Pigs in space>: 37
*** run 3
CURLOPT_SHARE
lock:   share  <Pigs in space>: 38
unlock: share  <Pigs in space>: 39
CURLOPT_COOKIEJAR
PERFORM
lock:   dns    <Pigs in space>: 40
unlock: dns    <Pigs in space>: 41
lock:   dns    <Pigs in space>: 42
unlock: dns    <Pigs in space>: 43
lock:   cookie <Pigs in space>: 44
unlock: cookie <Pigs in space>: 45
lock:   cookie <Pigs in space>: 46
unlock: cookie <Pigs in space>: 47
lock:   cookie <Pigs in space>: 48
unlock: cookie <Pigs in space>: 49
run 3: overwrite cookie 1 and 4
lock:   dns    <Pigs in space>: 50
unlock: dns    <Pigs in space>: 51
try SHARE_CLEANUP...
lock:   share  <Pigs in space>: 52
unlock: share  <Pigs in space>: 53
SHARE_CLEANUP failed, correct
CLEANUP
lock:   dns    <Pigs in space>: 54
unlock: dns    <Pigs in space>: 55
lock:   cookie <Pigs in space>: 56
unlock: cookie <Pigs in space>: 57
SHARE_CLEANUP
lock:   share  <Pigs in space>: 58
unlock: share  <Pigs in space>: 59
GLOBAL_CLEANUP
</stdout>
<stderr>
http://%HOSTIP:%HTTPPORT/506 
</stderr>
<file name="log/jar506" mode="text">
# Netscape HTTP Cookie File
# http://www.netscape.com/newsref/std/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.

.foo.com	TRUE	/	FALSE	1170417387	test1	overwritten1
.host.foo.com	TRUE	/	FALSE	1170330987	test2	two
.foo.com	TRUE	/	FALSE	1170330987	test3	three
.host.foo.com	TRUE	/	FALSE	1262303999	test4	overwritten4
.host.foo.com	TRUE	/	FALSE	1170330987	test5	five
</file>
</verify>