1*6236dae4SAndroid Build Coastguard Worker<testcase> 2*6236dae4SAndroid Build Coastguard Worker# Test case inspired by this question on stackoverflow: 3*6236dae4SAndroid Build Coastguard Worker# 4*6236dae4SAndroid Build Coastguard Worker# https://stackoverflow.com/questions/10017165/use-libcurl-with-bluecoat-cookie-proxy 5*6236dae4SAndroid Build Coastguard Worker# 6*6236dae4SAndroid Build Coastguard Worker<info> 7*6236dae4SAndroid Build Coastguard Worker<keywords> 8*6236dae4SAndroid Build Coastguard WorkerHTTP 9*6236dae4SAndroid Build Coastguard WorkerHTTP GET 10*6236dae4SAndroid Build Coastguard WorkerHTTP proxy 11*6236dae4SAndroid Build Coastguard Workercookies 12*6236dae4SAndroid Build Coastguard Worker</keywords> 13*6236dae4SAndroid Build Coastguard Worker</info> 14*6236dae4SAndroid Build Coastguard Worker 15*6236dae4SAndroid Build Coastguard Worker# Server-side 16*6236dae4SAndroid Build Coastguard Worker<reply> 17*6236dae4SAndroid Build Coastguard Worker<data> 18*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 407 Me not know you swsbounce 19*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 25 Sep 2001 19:37:44 GMT 20*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html 21*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: proxycookie=weirdo; Path=/ 22*6236dae4SAndroid Build Coastguard WorkerCache-control: private 23*6236dae4SAndroid Build Coastguard WorkerContent-Length: 62 24*6236dae4SAndroid Build Coastguard WorkerProxy-Authenticate: Basic realm="moo on you" 25*6236dae4SAndroid Build Coastguard Worker 26*6236dae4SAndroid Build Coastguard WorkerThis server reply is for testing a simple cookie test case... 27*6236dae4SAndroid Build Coastguard Worker</data> 28*6236dae4SAndroid Build Coastguard Worker 29*6236dae4SAndroid Build Coastguard Worker<data1> 30*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 Fine! 31*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html 32*6236dae4SAndroid Build Coastguard WorkerContent-Length: 6 33*6236dae4SAndroid Build Coastguard Worker 34*6236dae4SAndroid Build Coastguard Workerhello 35*6236dae4SAndroid Build Coastguard Worker</data1> 36*6236dae4SAndroid Build Coastguard Worker 37*6236dae4SAndroid Build Coastguard Worker<datacheck> 38*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 407 Me not know you swsbounce 39*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 25 Sep 2001 19:37:44 GMT 40*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html 41*6236dae4SAndroid Build Coastguard WorkerSet-Cookie: proxycookie=weirdo; Path=/ 42*6236dae4SAndroid Build Coastguard WorkerCache-control: private 43*6236dae4SAndroid Build Coastguard WorkerContent-Length: 62 44*6236dae4SAndroid Build Coastguard WorkerProxy-Authenticate: Basic realm="moo on you" 45*6236dae4SAndroid Build Coastguard Worker 46*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 Fine! 47*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html 48*6236dae4SAndroid Build Coastguard WorkerContent-Length: 6 49*6236dae4SAndroid Build Coastguard Worker 50*6236dae4SAndroid Build Coastguard Workerhello 51*6236dae4SAndroid Build Coastguard Worker</datacheck> 52*6236dae4SAndroid Build Coastguard Worker 53*6236dae4SAndroid Build Coastguard Worker 54*6236dae4SAndroid Build Coastguard Worker</reply> 55*6236dae4SAndroid Build Coastguard Worker 56*6236dae4SAndroid Build Coastguard Worker# Client-side 57*6236dae4SAndroid Build Coastguard Worker<client> 58*6236dae4SAndroid Build Coastguard Worker<server> 59*6236dae4SAndroid Build Coastguard Workerhttp 60*6236dae4SAndroid Build Coastguard Worker</server> 61*6236dae4SAndroid Build Coastguard Worker<name> 62*6236dae4SAndroid Build Coastguard WorkerHTTP --proxy-anyauth and 407 with cookies 63*6236dae4SAndroid Build Coastguard Worker</name> 64*6236dae4SAndroid Build Coastguard Worker<command> 65*6236dae4SAndroid Build Coastguard Worker-U myname:mypassword -x %HOSTIP:%HTTPPORT http://z.x.com/%TESTNUMBER --proxy-anyauth -c %LOGDIR/dump%TESTNUMBER 66*6236dae4SAndroid Build Coastguard Worker</command> 67*6236dae4SAndroid Build Coastguard Worker<features> 68*6236dae4SAndroid Build Coastguard Workercookies 69*6236dae4SAndroid Build Coastguard Workerproxy 70*6236dae4SAndroid Build Coastguard Worker</features> 71*6236dae4SAndroid Build Coastguard Worker</client> 72*6236dae4SAndroid Build Coastguard Worker 73*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot" 74*6236dae4SAndroid Build Coastguard Worker<verify> 75*6236dae4SAndroid Build Coastguard Worker<protocol> 76*6236dae4SAndroid Build Coastguard WorkerGET http://z.x.com/%TESTNUMBER HTTP/1.1 77*6236dae4SAndroid Build Coastguard WorkerHost: z.x.com 78*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION 79*6236dae4SAndroid Build Coastguard WorkerAccept: */* 80*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive 81*6236dae4SAndroid Build Coastguard Worker 82*6236dae4SAndroid Build Coastguard WorkerGET http://z.x.com/%TESTNUMBER HTTP/1.1 83*6236dae4SAndroid Build Coastguard WorkerHost: z.x.com 84*6236dae4SAndroid Build Coastguard WorkerProxy-Authorization: Basic bXluYW1lOm15cGFzc3dvcmQ= 85*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION 86*6236dae4SAndroid Build Coastguard WorkerAccept: */* 87*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive 88*6236dae4SAndroid Build Coastguard WorkerCookie: proxycookie=weirdo 89*6236dae4SAndroid Build Coastguard Worker 90*6236dae4SAndroid Build Coastguard Worker</protocol> 91*6236dae4SAndroid Build Coastguard Worker</verify> 92*6236dae4SAndroid Build Coastguard Worker</testcase> 93