1*6236dae4SAndroid Build Coastguard Worker<testcase> 2*6236dae4SAndroid Build Coastguard Worker<info> 3*6236dae4SAndroid Build Coastguard Worker<keywords> 4*6236dae4SAndroid Build Coastguard WorkerHTTP 5*6236dae4SAndroid Build Coastguard WorkerHTTP GET 6*6236dae4SAndroid Build Coastguard Workercookies 7*6236dae4SAndroid Build Coastguard Workershared cookies 8*6236dae4SAndroid Build Coastguard Worker</keywords> 9*6236dae4SAndroid Build Coastguard Worker</info> 10*6236dae4SAndroid Build Coastguard Worker 11*6236dae4SAndroid Build Coastguard Worker# Server-side 12*6236dae4SAndroid Build Coastguard Worker<reply> 13*6236dae4SAndroid Build Coastguard Worker<data1> 14*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK 15*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT 16*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake 17*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html 18*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test1=one; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 19*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test2=two; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 20*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test3=three; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 21*6236dae4SAndroid Build Coastguard WorkerContent-Length: 29 22*6236dae4SAndroid Build Coastguard Worker 23*6236dae4SAndroid Build Coastguard Workerrun 1: set cookie 1, 2 and 3 24*6236dae4SAndroid Build Coastguard Worker</data1> 25*6236dae4SAndroid Build Coastguard Worker<data2> 26*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK 27*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:01 GMT 28*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake 29*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html 30*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test4=four; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 31*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test5=five; domain=host.foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 32*6236dae4SAndroid Build Coastguard WorkerContent-Length: 26 33*6236dae4SAndroid Build Coastguard Worker 34*6236dae4SAndroid Build Coastguard Workerrun 2: set cookie 4 and 5 35*6236dae4SAndroid Build Coastguard Worker</data2> 36*6236dae4SAndroid Build Coastguard Worker<data3> 37*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK 38*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:02 GMT 39*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake 40*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html 41*6236dae4SAndroid Build Coastguard WorkerFunny-head: yesyes 42*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test4=overwritten4; domain=host.foo.com; expires=Sat May 5 GMT 11:56:27 2035 43*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test1=overwritten1; domain=foo.com; expires=Thu Mar 3 GMT 11:56:27 2033 44*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test6=six; domain=.www.host.foo.com; expires=Thu Mar 3 GMT 11:56:27 2033 45*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test6=six_more; expires=Thu Mar 3 GMT 11:56:27 2033 46*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html 47*6236dae4SAndroid Build Coastguard WorkerContent-Length: 73 48*6236dae4SAndroid Build Coastguard Worker 49*6236dae4SAndroid Build Coastguard Workerrun 3: overwrite cookie 1 and 4, set cookie 6 with and without tailmatch 50*6236dae4SAndroid Build Coastguard Worker</data3> 51*6236dae4SAndroid Build Coastguard Worker</reply> 52*6236dae4SAndroid Build Coastguard Worker 53*6236dae4SAndroid Build Coastguard Worker# Client-side 54*6236dae4SAndroid Build Coastguard Worker<client> 55*6236dae4SAndroid Build Coastguard Worker<server> 56*6236dae4SAndroid Build Coastguard Workerhttp 57*6236dae4SAndroid Build Coastguard Worker</server> 58*6236dae4SAndroid Build Coastguard Worker# don't run this with the threaded-resolver or c-ares since the events might 59*6236dae4SAndroid Build Coastguard Worker# trigger in a different order! 60*6236dae4SAndroid Build Coastguard Worker<features> 61*6236dae4SAndroid Build Coastguard Worker!threaded-resolver 62*6236dae4SAndroid Build Coastguard Worker!c-ares 63*6236dae4SAndroid Build Coastguard Worker</features> 64*6236dae4SAndroid Build Coastguard Worker<name> 65*6236dae4SAndroid Build Coastguard WorkerHTTP with shared cookie list (and dns cache) 66*6236dae4SAndroid Build Coastguard Worker</name> 67*6236dae4SAndroid Build Coastguard Worker# Explicitly set the time zone to a known good one, in case the user is 68*6236dae4SAndroid Build Coastguard Worker# using one of the 'right' zones that take into account leap seconds 69*6236dae4SAndroid Build Coastguard Worker# which causes the cookie expiry times to be different. 70*6236dae4SAndroid Build Coastguard Worker<setenv> 71*6236dae4SAndroid Build Coastguard WorkerTZ=GMT 72*6236dae4SAndroid Build Coastguard Worker</setenv> 73*6236dae4SAndroid Build Coastguard Worker<tool> 74*6236dae4SAndroid Build Coastguard Workerlib%TESTNUMBER 75*6236dae4SAndroid Build Coastguard Worker</tool> 76*6236dae4SAndroid Build Coastguard Worker<command> 77*6236dae4SAndroid Build Coastguard Workerhttp://%HOSTIP:%HTTPPORT/%TESTNUMBER %LOGDIR/jar%TESTNUMBER 78*6236dae4SAndroid Build Coastguard Worker</command> 79*6236dae4SAndroid Build Coastguard Worker</client> 80*6236dae4SAndroid Build Coastguard Worker 81*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot" 82*6236dae4SAndroid Build Coastguard Worker<verify> 83*6236dae4SAndroid Build Coastguard Worker<stdout> 84*6236dae4SAndroid Build Coastguard WorkerGLOBAL_INIT 85*6236dae4SAndroid Build Coastguard WorkerSHARE_INIT 86*6236dae4SAndroid Build Coastguard WorkerCURLSHOPT_LOCKFUNC 87*6236dae4SAndroid Build Coastguard WorkerCURLSHOPT_UNLOCKFUNC 88*6236dae4SAndroid Build Coastguard WorkerCURLSHOPT_USERDATA 89*6236dae4SAndroid Build Coastguard WorkerCURL_LOCK_DATA_COOKIE 90*6236dae4SAndroid Build Coastguard WorkerCURL_LOCK_DATA_DNS 91*6236dae4SAndroid Build Coastguard WorkerCURLOPT_SHARE 92*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 0 93*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 1 94*6236dae4SAndroid Build Coastguard WorkerCURLOPT_COOKIELIST injected_and_clobbered 95*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 2 96*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 3 97*6236dae4SAndroid Build Coastguard WorkerCURLOPT_COOKIELIST ALL 98*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 4 99*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 5 100*6236dae4SAndroid Build Coastguard WorkerCURLOPT_COOKIELIST session 101*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 6 102*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 7 103*6236dae4SAndroid Build Coastguard WorkerCURLOPT_COOKIELIST injected 104*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 8 105*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 9 106*6236dae4SAndroid Build Coastguard WorkerCURLOPT_COOKIELIST SESS 107*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 10 108*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 11 109*6236dae4SAndroid Build Coastguard WorkerCLEANUP 110*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 12 111*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 13 112*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 14 113*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 15 114*6236dae4SAndroid Build Coastguard Worker*** run 1 115*6236dae4SAndroid Build Coastguard WorkerCURLOPT_SHARE 116*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 16 117*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 17 118*6236dae4SAndroid Build Coastguard WorkerPERFORM 119*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 18 120*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 19 121*6236dae4SAndroid Build Coastguard Workerlock: dns [Pigs in space]: 20 122*6236dae4SAndroid Build Coastguard Workerunlock: dns [Pigs in space]: 21 123*6236dae4SAndroid Build Coastguard Workerlock: dns [Pigs in space]: 22 124*6236dae4SAndroid Build Coastguard Workerunlock: dns [Pigs in space]: 23 125*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 24 126*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 25 127*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 26 128*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 27 129*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 28 130*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 29 131*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 30 132*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 31 133*6236dae4SAndroid Build Coastguard Workerrun 1: set cookie 1, 2 and 3 134*6236dae4SAndroid Build Coastguard Workerlock: dns [Pigs in space]: 32 135*6236dae4SAndroid Build Coastguard Workerunlock: dns [Pigs in space]: 33 136*6236dae4SAndroid Build Coastguard Workerlock: dns [Pigs in space]: 34 137*6236dae4SAndroid Build Coastguard Workerunlock: dns [Pigs in space]: 35 138*6236dae4SAndroid Build Coastguard WorkerCLEANUP 139*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 36 140*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 37 141*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 38 142*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 39 143*6236dae4SAndroid Build Coastguard Worker*** run 2 144*6236dae4SAndroid Build Coastguard WorkerCURLOPT_SHARE 145*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 40 146*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 41 147*6236dae4SAndroid Build Coastguard WorkerPERFORM 148*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 42 149*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 43 150*6236dae4SAndroid Build Coastguard Workerlock: dns [Pigs in space]: 44 151*6236dae4SAndroid Build Coastguard Workerunlock: dns [Pigs in space]: 45 152*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 46 153*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 47 154*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 48 155*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 49 156*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 50 157*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 51 158*6236dae4SAndroid Build Coastguard Workerrun 2: set cookie 4 and 5 159*6236dae4SAndroid Build Coastguard Workerlock: dns [Pigs in space]: 52 160*6236dae4SAndroid Build Coastguard Workerunlock: dns [Pigs in space]: 53 161*6236dae4SAndroid Build Coastguard Workerlock: dns [Pigs in space]: 54 162*6236dae4SAndroid Build Coastguard Workerunlock: dns [Pigs in space]: 55 163*6236dae4SAndroid Build Coastguard WorkerCLEANUP 164*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 56 165*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 57 166*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 58 167*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 59 168*6236dae4SAndroid Build Coastguard Worker*** run 3 169*6236dae4SAndroid Build Coastguard WorkerCURLOPT_SHARE 170*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 60 171*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 61 172*6236dae4SAndroid Build Coastguard WorkerCURLOPT_COOKIEJAR 173*6236dae4SAndroid Build Coastguard WorkerCURLOPT_COOKIELIST FLUSH 174*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 62 175*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 63 176*6236dae4SAndroid Build Coastguard WorkerPERFORM 177*6236dae4SAndroid Build Coastguard Workerlock: dns [Pigs in space]: 64 178*6236dae4SAndroid Build Coastguard Workerunlock: dns [Pigs in space]: 65 179*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 66 180*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 67 181*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 68 182*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 69 183*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 70 184*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 71 185*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 72 186*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 73 187*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 74 188*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 75 189*6236dae4SAndroid Build Coastguard Workerrun 3: overwrite cookie 1 and 4, set cookie 6 with and without tailmatch 190*6236dae4SAndroid Build Coastguard Workerlock: dns [Pigs in space]: 76 191*6236dae4SAndroid Build Coastguard Workerunlock: dns [Pigs in space]: 77 192*6236dae4SAndroid Build Coastguard Workerlock: dns [Pigs in space]: 78 193*6236dae4SAndroid Build Coastguard Workerunlock: dns [Pigs in space]: 79 194*6236dae4SAndroid Build Coastguard WorkerCLEANUP 195*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 80 196*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 81 197*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 82 198*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 83 199*6236dae4SAndroid Build Coastguard WorkerCURLOPT_SHARE 200*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 84 201*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 85 202*6236dae4SAndroid Build Coastguard WorkerCURLOPT_COOKIELIST ALL 203*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 86 204*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 87 205*6236dae4SAndroid Build Coastguard WorkerCURLOPT_COOKIEJAR 206*6236dae4SAndroid Build Coastguard WorkerCURLOPT_COOKIELIST RELOAD 207*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 88 208*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 89 209*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 90 210*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 91 211*6236dae4SAndroid Build Coastguard Workerloaded cookies: 212*6236dae4SAndroid Build Coastguard Worker----------------- 213*6236dae4SAndroid Build Coastguard Worker www.host.foo.com FALSE / FALSE 1993463787 test6 six_more 214*6236dae4SAndroid Build Coastguard Worker .www.host.foo.com TRUE / FALSE 1993463787 test6 six 215*6236dae4SAndroid Build Coastguard Worker .host.foo.com TRUE / FALSE 1896263787 test5 five 216*6236dae4SAndroid Build Coastguard Worker .host.foo.com TRUE / FALSE 2061978987 test4 overwritten4 217*6236dae4SAndroid Build Coastguard Worker .foo.com TRUE / FALSE 1896263787 test3 three 218*6236dae4SAndroid Build Coastguard Worker .host.foo.com TRUE / FALSE 1896263787 test2 two 219*6236dae4SAndroid Build Coastguard Worker .foo.com TRUE / FALSE 1993463787 test1 overwritten1 220*6236dae4SAndroid Build Coastguard Worker .host.foo.com TRUE / FALSE 1896263787 injected yes 221*6236dae4SAndroid Build Coastguard Worker----------------- 222*6236dae4SAndroid Build Coastguard Workertry SHARE_CLEANUP... 223*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 92 224*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 93 225*6236dae4SAndroid Build Coastguard WorkerSHARE_CLEANUP failed, correct 226*6236dae4SAndroid Build Coastguard WorkerCLEANUP 227*6236dae4SAndroid Build Coastguard Workerlock: cookie [Pigs in space]: 94 228*6236dae4SAndroid Build Coastguard Workerunlock: cookie [Pigs in space]: 95 229*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 96 230*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 97 231*6236dae4SAndroid Build Coastguard WorkerSHARE_CLEANUP 232*6236dae4SAndroid Build Coastguard Workerlock: share [Pigs in space]: 98 233*6236dae4SAndroid Build Coastguard Workerunlock: share [Pigs in space]: 99 234*6236dae4SAndroid Build Coastguard WorkerGLOBAL_CLEANUP 235*6236dae4SAndroid Build Coastguard Worker</stdout> 236*6236dae4SAndroid Build Coastguard Worker<file name="%LOGDIR/jar%TESTNUMBER" mode="text"> 237*6236dae4SAndroid Build Coastguard Worker# Netscape HTTP Cookie File 238*6236dae4SAndroid Build Coastguard Worker# https://curl.se/docs/http-cookies.html 239*6236dae4SAndroid Build Coastguard Worker# This file was generated by libcurl! Edit at your own risk. 240*6236dae4SAndroid Build Coastguard Worker 241*6236dae4SAndroid Build Coastguard Workerwww.host.foo.com FALSE / FALSE 1993463787 test6 six_more 242*6236dae4SAndroid Build Coastguard Worker.www.host.foo.com TRUE / FALSE 1993463787 test6 six 243*6236dae4SAndroid Build Coastguard Worker.host.foo.com TRUE / FALSE 1896263787 test5 five 244*6236dae4SAndroid Build Coastguard Worker.host.foo.com TRUE / FALSE 2061978987 test4 overwritten4 245*6236dae4SAndroid Build Coastguard Worker.foo.com TRUE / FALSE 1896263787 test3 three 246*6236dae4SAndroid Build Coastguard Worker.host.foo.com TRUE / FALSE 1896263787 test2 two 247*6236dae4SAndroid Build Coastguard Worker.foo.com TRUE / FALSE 1993463787 test1 overwritten1 248*6236dae4SAndroid Build Coastguard Worker.host.foo.com TRUE / FALSE 1896263787 injected yes 249*6236dae4SAndroid Build Coastguard Worker</file> 250*6236dae4SAndroid Build Coastguard Worker</verify> 251*6236dae4SAndroid Build Coastguard Worker</testcase> 252