File: test506

package info (click to toggle)
curl 8.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,016 kB
  • sloc: ansic: 202,975; perl: 20,695; python: 10,293; sh: 6,684; makefile: 1,529; pascal: 239; cpp: 174
file content (258 lines) | stat: -rw-r--r-- 7,702 bytes parent folder | download | duplicates (3)
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
HTTP
HTTP GET
cookies
shared cookies
</keywords>
</info>

# Server-side
<reply>
<data1>
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Type: text/html
Set-Cookie: test1=one; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
Set-Cookie: test2=two; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
Set-Cookie: test3=three; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
Content-Length: 29

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

run 2: set cookie 4 and 5
</data2>
<data3>
HTTP/1.1 200 OK
Date: Tue, 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=Sat May 5 GMT 11:56:27 2035
Set-Cookie: test1=overwritten1; domain=foo.com; expires=Thu Mar 3 GMT 11:56:27 2033
Set-Cookie: test6=six; domain=.www.host.foo.com; expires=Thu Mar 3 GMT 11:56:27 2033
Set-Cookie: test6=six_more; expires=Thu Mar 3 GMT 11:56:27 2033
Content-Type: text/html
Content-Length: 73

run 3: overwrite cookie 1 and 4, set cookie 6 with and without tailmatch
</data3>
</reply>

# Client-side
<client>
<server>
http
</server>
# do not run this with the threaded-resolver or c-ares since the events might
# trigger in a different order!
<features>
!threaded-resolver
!c-ares
</features>
<name>
HTTP with shared cookie list (and dns cache)
</name>
# Explicitly set the time zone to a known good one, in case the user is
# using one of the 'right' zones that take into account leap seconds
# which causes the cookie expiry times to be different.
<setenv>
TZ=GMT
</setenv>
<tool>
lib%TESTNUMBER
</tool>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER %LOGDIR/jar%TESTNUMBER
</command>
</client>

# Verify data after the test has been "shot"
<verify>
<stdout>
GLOBAL_INIT
SHARE_INIT
CURLSHOPT_LOCKFUNC
CURLSHOPT_UNLOCKFUNC
CURLSHOPT_USERDATA
CURL_LOCK_DATA_COOKIE
CURL_LOCK_DATA_DNS
CURLOPT_SHARE
lock:   share  [Pigs in space]: 0
unlock: share  [Pigs in space]: 1
CURLOPT_COOKIELIST injected_and_clobbered
lock:   cookie [Pigs in space]: 2
unlock: cookie [Pigs in space]: 3
CURLOPT_COOKIELIST ALL
lock:   cookie [Pigs in space]: 4
unlock: cookie [Pigs in space]: 5
CURLOPT_COOKIELIST session
lock:   cookie [Pigs in space]: 6
unlock: cookie [Pigs in space]: 7
CURLOPT_COOKIELIST injected
lock:   cookie [Pigs in space]: 8
unlock: cookie [Pigs in space]: 9
CURLOPT_COOKIELIST SESS
lock:   cookie [Pigs in space]: 10
unlock: cookie [Pigs in space]: 11
CLEANUP
lock:   cookie [Pigs in space]: 12
unlock: cookie [Pigs in space]: 13
lock:   share  [Pigs in space]: 14
unlock: share  [Pigs in space]: 15
*** run 1
CURLOPT_SHARE
lock:   share  [Pigs in space]: 16
unlock: share  [Pigs in space]: 17
PERFORM
lock:   cookie [Pigs in space]: 18
unlock: cookie [Pigs in space]: 19
lock:   cookie [Pigs in space]: 20
unlock: cookie [Pigs in space]: 21
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
lock:   cookie [Pigs in space]: 32
unlock: cookie [Pigs in space]: 33
run 1: set cookie 1, 2 and 3
lock:   dns    [Pigs in space]: 34
unlock: dns    [Pigs in space]: 35
lock:   dns    [Pigs in space]: 36
unlock: dns    [Pigs in space]: 37
CLEANUP
lock:   cookie [Pigs in space]: 38
unlock: cookie [Pigs in space]: 39
lock:   share  [Pigs in space]: 40
unlock: share  [Pigs in space]: 41
*** run 2
CURLOPT_SHARE
lock:   share  [Pigs in space]: 42
unlock: share  [Pigs in space]: 43
PERFORM
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:   dns    [Pigs in space]: 48
unlock: dns    [Pigs in space]: 49
lock:   cookie [Pigs in space]: 50
unlock: cookie [Pigs in space]: 51
lock:   cookie [Pigs in space]: 52
unlock: cookie [Pigs in space]: 53
lock:   cookie [Pigs in space]: 54
unlock: cookie [Pigs in space]: 55
run 2: set cookie 4 and 5
lock:   dns    [Pigs in space]: 56
unlock: dns    [Pigs in space]: 57
lock:   dns    [Pigs in space]: 58
unlock: dns    [Pigs in space]: 59
CLEANUP
lock:   cookie [Pigs in space]: 60
unlock: cookie [Pigs in space]: 61
lock:   share  [Pigs in space]: 62
unlock: share  [Pigs in space]: 63
*** run 3
CURLOPT_SHARE
lock:   share  [Pigs in space]: 64
unlock: share  [Pigs in space]: 65
CURLOPT_COOKIEJAR
CURLOPT_COOKIELIST FLUSH
lock:   cookie [Pigs in space]: 66
unlock: cookie [Pigs in space]: 67
PERFORM
lock:   cookie [Pigs in space]: 68
unlock: cookie [Pigs in space]: 69
lock:   dns    [Pigs in space]: 70
unlock: dns    [Pigs in space]: 71
lock:   cookie [Pigs in space]: 72
unlock: cookie [Pigs in space]: 73
lock:   cookie [Pigs in space]: 74
unlock: cookie [Pigs in space]: 75
lock:   cookie [Pigs in space]: 76
unlock: cookie [Pigs in space]: 77
lock:   cookie [Pigs in space]: 78
unlock: cookie [Pigs in space]: 79
lock:   cookie [Pigs in space]: 80
unlock: cookie [Pigs in space]: 81
run 3: overwrite cookie 1 and 4, set cookie 6 with and without tailmatch
lock:   dns    [Pigs in space]: 82
unlock: dns    [Pigs in space]: 83
lock:   dns    [Pigs in space]: 84
unlock: dns    [Pigs in space]: 85
CLEANUP
lock:   cookie [Pigs in space]: 86
unlock: cookie [Pigs in space]: 87
lock:   share  [Pigs in space]: 88
unlock: share  [Pigs in space]: 89
CURLOPT_SHARE
lock:   share  [Pigs in space]: 90
unlock: share  [Pigs in space]: 91
CURLOPT_COOKIELIST ALL
lock:   cookie [Pigs in space]: 92
unlock: cookie [Pigs in space]: 93
CURLOPT_COOKIEJAR
CURLOPT_COOKIELIST RELOAD
lock:   cookie [Pigs in space]: 94
unlock: cookie [Pigs in space]: 95
lock:   cookie [Pigs in space]: 96
unlock: cookie [Pigs in space]: 97
loaded cookies:
-----------------
  www.host.foo.com	FALSE	/	FALSE	%days[400]	test6	six_more
  .www.host.foo.com	TRUE	/	FALSE	%days[400]	test6	six
  .host.foo.com	TRUE	/	FALSE	%days[400]	test5	five
  .host.foo.com	TRUE	/	FALSE	%days[400]	test4	overwritten4
  .foo.com	TRUE	/	FALSE	%days[400]	test3	three
  .host.foo.com	TRUE	/	FALSE	%days[400]	test2	two
  .foo.com	TRUE	/	FALSE	%days[400]	test1	overwritten1
  .host.foo.com	TRUE	/	FALSE	%days[400]	injected	yes
-----------------
try SHARE_CLEANUP...
lock:   share  [Pigs in space]: 98
unlock: share  [Pigs in space]: 99
SHARE_CLEANUP failed, correct
CLEANUP
lock:   cookie [Pigs in space]: 100
unlock: cookie [Pigs in space]: 101
lock:   share  [Pigs in space]: 102
unlock: share  [Pigs in space]: 103
SHARE_CLEANUP
lock:   share  [Pigs in space]: 104
unlock: share  [Pigs in space]: 105
GLOBAL_CLEANUP
</stdout>
<file name="%LOGDIR/jar%TESTNUMBER" mode="text">
# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

www.host.foo.com	FALSE	/	FALSE	%days[400]	test6	six_more
.www.host.foo.com	TRUE	/	FALSE	%days[400]	test6	six
.host.foo.com	TRUE	/	FALSE	%days[400]	test5	five
.host.foo.com	TRUE	/	FALSE	%days[400]	test4	overwritten4
.foo.com	TRUE	/	FALSE	%days[400]	test3	three
.host.foo.com	TRUE	/	FALSE	%days[400]	test2	two
.foo.com	TRUE	/	FALSE	%days[400]	test1	overwritten1
.host.foo.com	TRUE	/	FALSE	%days[400]	injected	yes
</file>
</verify>
</testcase>