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 Worker</keywords> 8*6236dae4SAndroid Build Coastguard Worker</info> 9*6236dae4SAndroid Build Coastguard Worker# Server-side 10*6236dae4SAndroid Build Coastguard Worker<reply> 11*6236dae4SAndroid Build Coastguard Worker<data> 12*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK swsclose 13*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT 14*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake 15*6236dae4SAndroid Build Coastguard Worker 16*6236dae4SAndroid Build Coastguard Worker</data> 17*6236dae4SAndroid Build Coastguard Worker</reply> 18*6236dae4SAndroid Build Coastguard Worker 19*6236dae4SAndroid Build Coastguard Worker# Client-side 20*6236dae4SAndroid Build Coastguard Worker<client> 21*6236dae4SAndroid Build Coastguard Worker<server> 22*6236dae4SAndroid Build Coastguard Workerhttp 23*6236dae4SAndroid Build Coastguard Worker</server> 24*6236dae4SAndroid Build Coastguard Worker<name> 25*6236dae4SAndroid Build Coastguard WorkerHTTP with cookie parsing from header file 26*6236dae4SAndroid Build Coastguard Worker</name> 27*6236dae4SAndroid Build Coastguard Worker<command> 28*6236dae4SAndroid Build Coastguard Workerhttp://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -b %LOGDIR/heads%TESTNUMBER.txt 29*6236dae4SAndroid Build Coastguard Worker</command> 30*6236dae4SAndroid Build Coastguard Worker 31*6236dae4SAndroid Build Coastguard Worker# We create this file before the command is invoked! 32*6236dae4SAndroid Build Coastguard Worker<file name="%LOGDIR/heads%TESTNUMBER.txt"> 33*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK 34*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT 35*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake 36*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html 37*6236dae4SAndroid Build Coastguard WorkerFunny-head: yesyes 38*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: foobar=name; domain=%HOSTIP; path=/; 39*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: mismatch=this; domain=%HOSTIP; path="/silly/"; 40*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: partmatch=present; domain=.0.0.1; path=/w; 41*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: duplicate=test; domain=.0.0.1; domain=.0.0.1; path=/donkey; 42*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie=yes; path=/we; 43*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie=perhaps; path=/we/want; 44*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: name with space=is weird but; path=/we/want; 45*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: trailingspace = removed; path=/we/want; 46*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: nocookie=yes; path=/WE; 47*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: blexp=yesyes; domain=%HOSTIP; domain=%HOSTIP; expiry=totally bad; 48*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: partialip=nono; domain=.0.0.1; 49*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie1=%hex[%01-junk]hex% 50*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie2=%hex[%02-junk]hex% 51*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie3=%hex[%03-junk]hex% 52*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie4=%hex[%04-junk]hex% 53*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie5=%hex[%05-junk]hex% 54*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie6=%hex[%06-junk]hex% 55*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie7=%hex[%07-junk]hex% 56*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie8=%hex[%08-junk]hex% 57*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie9=%hex[junk--%09]hex% 58*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie11=%hex[%0b-junk]hex% 59*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie12=%hex[%0c-junk]hex% 60*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie14=%hex[%0e-junk]hex% 61*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie15=%hex[%0f-junk]hex% 62*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie16=%hex[%10-junk]hex% 63*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie17=%hex[%11-junk]hex% 64*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie18=%hex[%12-junk]hex% 65*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie19=%hex[%13-junk]hex% 66*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie20=%hex[%14-junk]hex% 67*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie21=%hex[%15-junk]hex% 68*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie22=%hex[%16-junk]hex% 69*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie23=%hex[%17-junk]hex% 70*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie24=%hex[%18-junk]hex% 71*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie25=%hex[%19-junk]hex% 72*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie26=%hex[%1a-junk]hex% 73*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie27=%hex[%1b-junk]hex% 74*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie28=%hex[%1c-junk]hex% 75*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie29=%hex[%1d-junk]hex% 76*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie30=%hex[%1e-junk]hex% 77*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie31=%hex[%1f-junk]hex% 78*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: cookie31=%hex[%7f-junk]hex% 79*6236dae4SAndroid Build Coastguard Worker 80*6236dae4SAndroid Build Coastguard Worker</file> 81*6236dae4SAndroid Build Coastguard Worker<precheck> 82*6236dae4SAndroid Build Coastguard Worker%PERL -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}' 83*6236dae4SAndroid Build Coastguard Worker</precheck> 84*6236dae4SAndroid Build Coastguard Worker<features> 85*6236dae4SAndroid Build Coastguard Workercookies 86*6236dae4SAndroid Build Coastguard Worker</features> 87*6236dae4SAndroid Build Coastguard Worker</client> 88*6236dae4SAndroid Build Coastguard Worker 89*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot" 90*6236dae4SAndroid Build Coastguard Worker<verify> 91*6236dae4SAndroid Build Coastguard Worker<protocol> 92*6236dae4SAndroid Build Coastguard WorkerGET /we/want/%TESTNUMBER HTTP/1.1 93*6236dae4SAndroid Build Coastguard WorkerHost: %HOSTIP:%HTTPPORT 94*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION 95*6236dae4SAndroid Build Coastguard WorkerAccept: */* 96*6236dae4SAndroid Build Coastguard WorkerCookie: name with space=is weird but; trailingspace=removed; cookie=perhaps; cookie=yes; foobar=name; blexp=yesyes; cookie9=junk-- 97*6236dae4SAndroid Build Coastguard Worker 98*6236dae4SAndroid Build Coastguard Worker</protocol> 99*6236dae4SAndroid Build Coastguard Worker</verify> 100*6236dae4SAndroid Build Coastguard Worker</testcase> 101