Debian Codegraph @

curl/tests/data/test506

raw
1 # Server-side
2 <reply>
3 <data1>
4 HTTP/1.1 200 OK
5 Date: Thu, 09 Nov 2010 14:49:00 GMT
6 Server: test-server/fake
7 Content-Type: text/html
8 Set-Cookie: test1=one; domain=foo.com; expires=Tue Feb 1 11:56:27 GMT 2007
9 Set-Cookie: test2=two; domain=host.foo.com; expires=Tue Feb 1 11:56:27 GMT 2007
10 Set-Cookie: test3=three; domain=foo.com; expires=Tue Feb 1 11:56:27 GMT 2007
11 Content-Length: 29
12
13 run 1: set cookie 1, 2 and 3
14 </data1>
15 <data2>
16 HTTP/1.1 200 OK
17 Date: Thu, 09 Nov 2010 14:49:01 GMT
18 Server: test-server/fake
19 Content-Type: text/html
20 Set-Cookie: test4=four; domain=host.foo.com; expires=Tue Feb 1 11:56:27 GMT 2007
21 Set-Cookie: test5=five; domain=host.foo.com; expires=Tue Feb 1 11:56:27 GMT 2007
22 Content-Length: 26
23
24 run 2: set cookie 4 and 5
25 </data2>
26 <data3>
27 HTTP/1.1 200 OK
28 Date: Thu, 09 Nov 2010 14:49:02 GMT
29 Server: test-server/fake
30 Content-Type: text/html
31 Funny-head: yesyes
32 Set-Cookie: test4=overwritten4; domain=host.foo.com; expires=Thu Dec 31 23:59:59 GMT 2009
33 Set-Cookie: test1=overwritten1; domain=foo.com; expires=Tue Feb 2 11:56:27 GMT 2007
34 Content-Type: text/html
35 Content-Length: 32
36
37 run 3: overwrite cookie 1 and 4
38 </data5>
39 </reply>
40
41 # Client-side
42 <client>
43 <server>
44 http
45 </server>
46 <name>
47 HTTP with shared cookie list (and dns cache)
48 </name>
49 <tool>
50 lib506
51 </tool>
52 <command>
53 http://%HOSTIP:%HTTPPORT/506
54 </command>
55 </client>
56
57 # Verify data after the test has been "shot"
58 <verify>
59 <stdout>
60 GLOBAL_INIT
61 SHARE_INIT
62 CURL_LOCK_DATA_COOKIE
63 CURL_LOCK_DATA_DNS
64 *** run 1
65 CURLOPT_SHARE
66 lock: share <Pigs in space>: 0
67 unlock: share <Pigs in space>: 1
68 PERFORM
69 lock: dns <Pigs in space>: 2
70 unlock: dns <Pigs in space>: 3
71 lock: dns <Pigs in space>: 4
72 unlock: dns <Pigs in space>: 5
73 lock: cookie <Pigs in space>: 6
74 unlock: cookie <Pigs in space>: 7
75 lock: cookie <Pigs in space>: 8
76 unlock: cookie <Pigs in space>: 9
77 lock: cookie <Pigs in space>: 10
78 unlock: cookie <Pigs in space>: 11
79 lock: cookie <Pigs in space>: 12
80 unlock: cookie <Pigs in space>: 13
81 run 1: set cookie 1, 2 and 3
82 lock: dns <Pigs in space>: 14
83 unlock: dns <Pigs in space>: 15
84 CLEANUP
85 lock: dns <Pigs in space>: 16
86 unlock: dns <Pigs in space>: 17
87 lock: cookie <Pigs in space>: 18
88 unlock: cookie <Pigs in space>: 19
89 *** run 2
90 CURLOPT_SHARE
91 lock: share <Pigs in space>: 20
92 unlock: share <Pigs in space>: 21
93 PERFORM
94 lock: dns <Pigs in space>: 22
95 unlock: dns <Pigs in space>: 23
96 lock: dns <Pigs in space>: 24
97 unlock: dns <Pigs in space>: 25
98 lock: cookie <Pigs in space>: 26
99 unlock: cookie <Pigs in space>: 27
100 lock: cookie <Pigs in space>: 28
101 unlock: cookie <Pigs in space>: 29
102 lock: cookie <Pigs in space>: 30
103 unlock: cookie <Pigs in space>: 31
104 run 2: set cookie 4 and 5
105 lock: dns <Pigs in space>: 32
106 unlock: dns <Pigs in space>: 33
107 CLEANUP
108 lock: dns <Pigs in space>: 34
109 unlock: dns <Pigs in space>: 35
110 lock: cookie <Pigs in space>: 36
111 unlock: cookie <Pigs in space>: 37
112 *** run 3
113 CURLOPT_SHARE
114 lock: share <Pigs in space>: 38
115 unlock: share <Pigs in space>: 39
116 CURLOPT_COOKIEJAR
117 PERFORM
118 lock: dns <Pigs in space>: 40
119 unlock: dns <Pigs in space>: 41
120 lock: dns <Pigs in space>: 42
121 unlock: dns <Pigs in space>: 43
122 lock: cookie <Pigs in space>: 44
123 unlock: cookie <Pigs in space>: 45
124 lock: cookie <Pigs in space>: 46
125 unlock: cookie <Pigs in space>: 47
126 lock: cookie <Pigs in space>: 48
127 unlock: cookie <Pigs in space>: 49
128 run 3: overwrite cookie 1 and 4
129 lock: dns <Pigs in space>: 50
130 unlock: dns <Pigs in space>: 51
131 try SHARE_CLEANUP...
132 lock: share <Pigs in space>: 52
133 unlock: share <Pigs in space>: 53
134 SHARE_CLEANUP failed, correct
135 CLEANUP
136 lock: dns <Pigs in space>: 54
137 unlock: dns <Pigs in space>: 55
138 lock: cookie <Pigs in space>: 56
139 unlock: cookie <Pigs in space>: 57
140 SHARE_CLEANUP
141 lock: share <Pigs in space>: 58
142 unlock: share <Pigs in space>: 59
143 GLOBAL_CLEANUP
144 </stdout>
145 <stderr>
146 http://%HOSTIP:%HTTPPORT/506
147 </stderr>
148 <file name="log/jar506">
149 # Netscape HTTP Cookie File
150 # http://www.netscape.com/newsref/std/cookie_spec.html
151 # This file was generated by libcurl! Edit at your own risk.
152
153 .foo.com TRUE / FALSE 1170417387 test1 overwritten1
154 .host.foo.com TRUE / FALSE 1170330987 test2 two
155 .foo.com TRUE / FALSE 1170330987 test3 three
156 .host.foo.com TRUE / FALSE 1262303999 test4 overwritten4
157 .host.foo.com TRUE / FALSE 1170330987 test5 five
158 </file>
159 </verify>