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 Workercookiejar 8*6236dae4SAndroid Build Coastguard Worker</keywords> 9*6236dae4SAndroid Build Coastguard Worker</info> 10*6236dae4SAndroid Build Coastguard Worker# Server-side 11*6236dae4SAndroid Build Coastguard Worker# 12*6236dae4SAndroid Build Coastguard Worker# The cookies set come in two versions. This is because when curl is built 13*6236dae4SAndroid Build Coastguard Worker# with Hyper, the API provides the headers already "sanitized" so we cannot 14*6236dae4SAndroid Build Coastguard Worker# compare with the exact server contents unless it too sends the data 15*6236dae4SAndroid Build Coastguard Worker# "clean". 16*6236dae4SAndroid Build Coastguard Worker 17*6236dae4SAndroid Build Coastguard Worker<reply> 18*6236dae4SAndroid Build Coastguard Worker<data> 19*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK 20*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT 21*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake 22*6236dae4SAndroid Build Coastguard WorkerContent-Length: 4 23*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html 24*6236dae4SAndroid Build Coastguard WorkerFunny-head: yesyes 25*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: blankdomain=sure; domain=; path=/ 26*6236dae4SAndroid Build Coastguard Worker%if !hyper 27*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: foobar=name; domain=anything.com; path=/ ; secure 28*6236dae4SAndroid Build Coastguard WorkerSet-Cookie:ismatch=this ; domain=test31.curl; path=/silly/ 29*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: overwrite=this ; domain=test31.curl; path=/overwrite/ 30*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: overwrite=this2 ; domain=test31.curl; path=/overwrite 31*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec1value=secure1 ; domain=test31.curl; path=/secure1/ ; secure 32*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec2value=secure2 ; domain=test31.curl; path=/secure2/ ; secure= 33*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec3value=secure3 ; domain=test31.curl; path=/secure3/ ; secure= 34*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec4value=secure4 ; secure=; domain=test31.curl; path=/secure4/ ; 35*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec5value=secure5 ; secure; domain=test31.curl; path=/secure5/ ; 36*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec6value=secure6 ; secure ; domain=test31.curl; path=/secure6/ ; 37*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec7value=secure7 ; secure ; domain=test31.curl; path=/secure7/ ; 38*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec8value=secure8 ; secure= ; domain=test31.curl; path=/secure8/ ; 39*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: secure=very1 ; secure=; domain=test31.curl; path=/secure9/; 40*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpo1=value1 ; domain=test31.curl; path=/p1/; httponly 41*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpo2=value2 ; domain=test31.curl; path=/p2/; httponly= 42*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpo3=value3 ; httponly; domain=test31.curl; path=/p3/; 43*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpo4=value4 ; httponly=; domain=test31.curl; path=/p4/; 44*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httponly=myvalue1 ; domain=test31.curl; path=/p4/; httponly 45*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec=myvalue2 ; domain=test31.curl; path=/p4/; httponly; secure 46*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec2=myvalue3; domain=test31.curl; path=/p4/; httponly=; secure 47*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec3=myvalue4 ; domain=test31.curl; path=/p4/; httponly; secure= 48*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec4=myvalue5 ; domain=test31.curl; path=/p4/; httponly=; secure= 49*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec5=myvalue6 ; domain=test31.curl; path=/p4/; secure; httponly= 50*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec6=myvalue7 ; domain=test31.curl; path=/p4/; secure=; httponly= 51*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec7=myvalue8 ; domain=test31.curl; path=/p4/; secure; httponly 52*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec8=myvalue9; domain=test31.curl; path=/p4/; secure=; httponly 53*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: partmatch=present; domain=test31.curl ; path=/; 54*6236dae4SAndroid Build Coastguard WorkerSet-Cookie:eat=this; domain=moo.foo.moo; 55*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: eat=this-too; domain=.foo.moo; 56*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: nodomainnovalue 57*6236dae4SAndroid Build Coastguard Worker%if large-time 58*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: nodomain=value; expires=Fri Feb 13 11:56:27 GMT 2525 59*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: novalue; domain=reallysilly 60*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2525 61*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2525 62*6236dae4SAndroid Build Coastguard Worker%else 63*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: nodomain=value; expires=Fri Feb 13 11:56:27 GMT 2037 64*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: novalue; domain=reallysilly 65*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 66*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030 67*6236dae4SAndroid Build Coastguard Worker%endif 68*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: magic=yessir; path=/silly/; HttpOnly 69*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: blexp=yesyes; domain=test31.curl; domain=test31.curl; expiry=totally bad; 70*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: partialip=nono; domain=.0.0.1; 71*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: withspaces= yes within and around ; 72*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: withspaces2 =before equals; 73*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: prespace= yes before; 74*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: securewithspace=after ; secure = 75*6236dae4SAndroid Build Coastguard Worker%else 76*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: foobar=name; domain=anything.com; path=/ ; secure 77*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: ismatch=this ; domain=test31.curl; path=/silly/ 78*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: overwrite=this ; domain=test31.curl; path=/overwrite/ 79*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: overwrite=this2 ; domain=test31.curl; path=/overwrite 80*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec1value=secure1 ; domain=test31.curl; path=/secure1/ ; secure 81*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec2value=secure2 ; domain=test31.curl; path=/secure2/ ; secure= 82*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec3value=secure3 ; domain=test31.curl; path=/secure3/ ; secure= 83*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec4value=secure4 ; secure=; domain=test31.curl; path=/secure4/ ; 84*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec5value=secure5 ; secure; domain=test31.curl; path=/secure5/ ; 85*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec6value=secure6 ; secure ; domain=test31.curl; path=/secure6/ ; 86*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec7value=secure7 ; secure ; domain=test31.curl; path=/secure7/ ; 87*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: sec8value=secure8 ; secure= ; domain=test31.curl; path=/secure8/ ; 88*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: secure=very1 ; secure=; domain=test31.curl; path=/secure9/; 89*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpo1=value1 ; domain=test31.curl; path=/p1/; httponly 90*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpo2=value2 ; domain=test31.curl; path=/p2/; httponly= 91*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpo3=value3 ; httponly; domain=test31.curl; path=/p3/; 92*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpo4=value4 ; httponly=; domain=test31.curl; path=/p4/; 93*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httponly=myvalue1 ; domain=test31.curl; path=/p4/; httponly 94*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec=myvalue2 ; domain=test31.curl; path=/p4/; httponly; secure 95*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec2=myvalue3; domain=test31.curl; path=/p4/; httponly=; secure 96*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec3=myvalue4 ; domain=test31.curl; path=/p4/; httponly; secure= 97*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec4=myvalue5 ; domain=test31.curl; path=/p4/; httponly=; secure= 98*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec5=myvalue6 ; domain=test31.curl; path=/p4/; secure; httponly= 99*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec6=myvalue7 ; domain=test31.curl; path=/p4/; secure=; httponly= 100*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec7=myvalue8 ; domain=test31.curl; path=/p4/; secure; httponly 101*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: httpandsec8=myvalue9; domain=test31.curl; path=/p4/; secure=; httponly 102*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: partmatch=present; domain=test31.curl ; path=/; 103*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: eat=this; domain=moo.foo.moo; 104*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: eat=this-too; domain=.foo.moo; 105*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: nodomainnovalue 106*6236dae4SAndroid Build Coastguard Worker%if large-time 107*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: nodomain=value; expires=Fri Feb 13 11:56:27 GMT 2525 108*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: novalue; domain=reallysilly 109*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2525 110*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2525 111*6236dae4SAndroid Build Coastguard Worker%else 112*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: nodomain=value; expires=Fri Feb 13 11:56:27 GMT 2037 113*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: novalue; domain=reallysilly 114*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 115*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030 116*6236dae4SAndroid Build Coastguard Worker%endif 117*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: magic=yessir; path=/silly/; HttpOnly 118*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: blexp=yesyes; domain=test31.curl; domain=test31.curl; expiry=totally bad; 119*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: partialip=nono; domain=.0.0.1; 120*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: withspaces= yes within and around ; 121*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: withspaces2 =before equals; 122*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: prespace= yes before; 123*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: securewithspace=after ; secure = 124*6236dae4SAndroid Build Coastguard Worker%endif 125*6236dae4SAndroid Build Coastguard Worker 126*6236dae4SAndroid Build Coastguard Workerboo 127*6236dae4SAndroid Build Coastguard Worker</data> 128*6236dae4SAndroid Build Coastguard Worker</reply> 129*6236dae4SAndroid Build Coastguard Worker 130*6236dae4SAndroid Build Coastguard Worker# Client-side 131*6236dae4SAndroid Build Coastguard Worker<client> 132*6236dae4SAndroid Build Coastguard Worker<server> 133*6236dae4SAndroid Build Coastguard Workerhttp 134*6236dae4SAndroid Build Coastguard Worker</server> 135*6236dae4SAndroid Build Coastguard Worker<name> 136*6236dae4SAndroid Build Coastguard WorkerHTTP with weirdly formatted cookies and cookiejar storage 137*6236dae4SAndroid Build Coastguard Worker</name> 138*6236dae4SAndroid Build Coastguard Worker# Explicitly set the time zone to a known good one, in case the user is 139*6236dae4SAndroid Build Coastguard Worker# using one of the 'right' zones that take into account leap seconds 140*6236dae4SAndroid Build Coastguard Worker# which causes the cookie expiry times to be different. 141*6236dae4SAndroid Build Coastguard Worker<setenv> 142*6236dae4SAndroid Build Coastguard WorkerTZ=GMT 143*6236dae4SAndroid Build Coastguard Worker</setenv> 144*6236dae4SAndroid Build Coastguard Worker<command> 145*6236dae4SAndroid Build Coastguard Workerhttp://test31.curl:%HTTPPORT/we/want/%TESTNUMBER -b none -c %LOGDIR/jar%TESTNUMBER.txt --resolve test31.curl:%HTTPPORT:127.0.0.1 146*6236dae4SAndroid Build Coastguard Worker</command> 147*6236dae4SAndroid Build Coastguard Worker<features> 148*6236dae4SAndroid Build Coastguard Workercookies 149*6236dae4SAndroid Build Coastguard Workerlocal-http 150*6236dae4SAndroid Build Coastguard Worker</features> 151*6236dae4SAndroid Build Coastguard Worker</client> 152*6236dae4SAndroid Build Coastguard Worker 153*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot" 154*6236dae4SAndroid Build Coastguard Worker<verify> 155*6236dae4SAndroid Build Coastguard Worker<protocol> 156*6236dae4SAndroid Build Coastguard WorkerGET /we/want/%TESTNUMBER HTTP/1.1 157*6236dae4SAndroid Build Coastguard WorkerHost: test31.curl:%HTTPPORT 158*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION 159*6236dae4SAndroid Build Coastguard WorkerAccept: */* 160*6236dae4SAndroid Build Coastguard Worker 161*6236dae4SAndroid Build Coastguard Worker</protocol> 162*6236dae4SAndroid Build Coastguard Worker<file name="%LOGDIR/jar%TESTNUMBER.txt" mode="text"> 163*6236dae4SAndroid Build Coastguard Worker# Netscape HTTP Cookie File 164*6236dae4SAndroid Build Coastguard Worker# https://curl.se/docs/http-cookies.html 165*6236dae4SAndroid Build Coastguard Worker# This file was generated by libcurl! Edit at your own risk. 166*6236dae4SAndroid Build Coastguard Worker 167*6236dae4SAndroid Build Coastguard Workertest31.curl FALSE /we/want/ FALSE 0 prespace yes before 168*6236dae4SAndroid Build Coastguard Workertest31.curl FALSE /we/want/ FALSE 0 withspaces2 before equals 169*6236dae4SAndroid Build Coastguard Workertest31.curl FALSE /we/want/ FALSE 0 withspaces yes within and around 170*6236dae4SAndroid Build Coastguard Worker.test31.curl TRUE /we/want/ FALSE 0 blexp yesyes 171*6236dae4SAndroid Build Coastguard Worker#HttpOnly_test31.curl FALSE /silly/ FALSE 0 magic yessir 172*6236dae4SAndroid Build Coastguard Worker%if large-time 173*6236dae4SAndroid Build Coastguard Workertest31.curl FALSE /we/want/ FALSE 17517902187 nodomain value 174*6236dae4SAndroid Build Coastguard Worker%else 175*6236dae4SAndroid Build Coastguard Workertest31.curl FALSE /we/want/ FALSE 2118138987 nodomain value 176*6236dae4SAndroid Build Coastguard Worker%endif 177*6236dae4SAndroid Build Coastguard Worker.test31.curl TRUE / FALSE 0 partmatch present 178*6236dae4SAndroid Build Coastguard Worker#HttpOnly_.test31.curl TRUE /p4/ FALSE 0 httponly myvalue1 179*6236dae4SAndroid Build Coastguard Worker#HttpOnly_.test31.curl TRUE /p4/ FALSE 0 httpo4 value4 180*6236dae4SAndroid Build Coastguard Worker#HttpOnly_.test31.curl TRUE /p3/ FALSE 0 httpo3 value3 181*6236dae4SAndroid Build Coastguard Worker#HttpOnly_.test31.curl TRUE /p2/ FALSE 0 httpo2 value2 182*6236dae4SAndroid Build Coastguard Worker#HttpOnly_.test31.curl TRUE /p1/ FALSE 0 httpo1 value1 183*6236dae4SAndroid Build Coastguard Worker.test31.curl TRUE /overwrite FALSE 0 overwrite this2 184*6236dae4SAndroid Build Coastguard Worker.test31.curl TRUE /silly/ FALSE 0 ismatch this 185*6236dae4SAndroid Build Coastguard Workertest31.curl FALSE / FALSE 0 blankdomain sure 186*6236dae4SAndroid Build Coastguard Worker</file> 187*6236dae4SAndroid Build Coastguard Worker</verify> 188*6236dae4SAndroid Build Coastguard Worker</testcase> 189