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 FORMPOST 6*6236dae4SAndroid Build Coastguard WorkerHTTP proxy 7*6236dae4SAndroid Build Coastguard WorkerHTTP proxy Digest auth 8*6236dae4SAndroid Build Coastguard Worker--proxy-anyauth 9*6236dae4SAndroid Build Coastguard Worker</keywords> 10*6236dae4SAndroid Build Coastguard Worker</info> 11*6236dae4SAndroid Build Coastguard Worker# Server-side 12*6236dae4SAndroid Build Coastguard Worker<reply> 13*6236dae4SAndroid Build Coastguard Worker# The stupid test server doesn't response anything at all until the full 14*6236dae4SAndroid Build Coastguard Worker# request has been sent, and then of course the full POST has already been 15*6236dae4SAndroid Build Coastguard Worker# sent! 16*6236dae4SAndroid Build Coastguard Worker<data> 17*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 407 no, tell me who you are first 18*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT 19*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake 20*6236dae4SAndroid Build Coastguard WorkerProxy-Authenticate: Digest realm="many secrets", nonce="911" 21*6236dae4SAndroid Build Coastguard WorkerContent-Length: 0 22*6236dae4SAndroid Build Coastguard Worker 23*6236dae4SAndroid Build Coastguard Worker</data> 24*6236dae4SAndroid Build Coastguard Worker<data1000> 25*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 A OK 26*6236dae4SAndroid Build Coastguard WorkerServer: Microsoft-IIS/6.0 27*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html; charset=iso-8859-1 28*6236dae4SAndroid Build Coastguard WorkerContent-Length: 3 29*6236dae4SAndroid Build Coastguard Worker 30*6236dae4SAndroid Build Coastguard Workerok 31*6236dae4SAndroid Build Coastguard Worker</data1000> 32*6236dae4SAndroid Build Coastguard Worker<datacheck> 33*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 407 no, tell me who you are first 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 WorkerProxy-Authenticate: Digest realm="many secrets", nonce="911" 37*6236dae4SAndroid Build Coastguard WorkerContent-Length: 0 38*6236dae4SAndroid Build Coastguard Worker 39*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 A OK 40*6236dae4SAndroid Build Coastguard WorkerServer: Microsoft-IIS/6.0 41*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html; charset=iso-8859-1 42*6236dae4SAndroid Build Coastguard WorkerContent-Length: 3 43*6236dae4SAndroid Build Coastguard Worker 44*6236dae4SAndroid Build Coastguard Workerok 45*6236dae4SAndroid Build Coastguard Worker</datacheck> 46*6236dae4SAndroid Build Coastguard Worker 47*6236dae4SAndroid Build Coastguard Worker</reply> 48*6236dae4SAndroid Build Coastguard Worker 49*6236dae4SAndroid Build Coastguard Worker# Client-side 50*6236dae4SAndroid Build Coastguard Worker<client> 51*6236dae4SAndroid Build Coastguard Worker<server> 52*6236dae4SAndroid Build Coastguard Workerhttp 53*6236dae4SAndroid Build Coastguard Worker</server> 54*6236dae4SAndroid Build Coastguard Worker<features> 55*6236dae4SAndroid Build Coastguard WorkerMime 56*6236dae4SAndroid Build Coastguard Worker!SSPI 57*6236dae4SAndroid Build Coastguard Workercrypto 58*6236dae4SAndroid Build Coastguard Workerproxy 59*6236dae4SAndroid Build Coastguard Worker</features> 60*6236dae4SAndroid Build Coastguard Worker<name> 61*6236dae4SAndroid Build Coastguard WorkerHTTP POST multipart with Expect: header using proxy anyauth (Digest) 62*6236dae4SAndroid Build Coastguard Worker</name> 63*6236dae4SAndroid Build Coastguard Worker<command> 64*6236dae4SAndroid Build Coastguard Worker-x http://%HOSTIP:%HTTPPORT http://remotehost:54321/we/want/%TESTNUMBER -F name=daniel -F tool=curl -F file=@%LOGDIR/test%TESTNUMBER.txt -U uuuser:pppassword --proxy-anyauth -H "Expect: 100-continue" 65*6236dae4SAndroid Build Coastguard Worker</command> 66*6236dae4SAndroid Build Coastguard Worker# We create this file before the command is invoked! 67*6236dae4SAndroid Build Coastguard Worker<file name="%LOGDIR/test%TESTNUMBER.txt"> 68*6236dae4SAndroid Build Coastguard Workerfoo- 69*6236dae4SAndroid Build Coastguard WorkerThis is a moo- 70*6236dae4SAndroid Build Coastguard Workerbar 71*6236dae4SAndroid Build Coastguard Worker</file> 72*6236dae4SAndroid Build Coastguard Worker</client> 73*6236dae4SAndroid Build Coastguard Worker 74*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot" 75*6236dae4SAndroid Build Coastguard Worker<verify> 76*6236dae4SAndroid Build Coastguard Worker<strip> 77*6236dae4SAndroid Build Coastguard Worker^(Content-Type: multipart/form-data;|------).* 78*6236dae4SAndroid Build Coastguard Worker</strip> 79*6236dae4SAndroid Build Coastguard Worker<protocol> 80*6236dae4SAndroid Build Coastguard WorkerPOST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1 81*6236dae4SAndroid Build Coastguard WorkerHost: remotehost:54321 82*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION 83*6236dae4SAndroid Build Coastguard WorkerAccept: */* 84*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive 85*6236dae4SAndroid Build Coastguard WorkerExpect: 100-continue 86*6236dae4SAndroid Build Coastguard WorkerContent-Length: 433 87*6236dae4SAndroid Build Coastguard WorkerContent-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce 88*6236dae4SAndroid Build Coastguard Worker 89*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce 90*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="name" 91*6236dae4SAndroid Build Coastguard Worker 92*6236dae4SAndroid Build Coastguard Workerdaniel 93*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce 94*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="tool" 95*6236dae4SAndroid Build Coastguard Worker 96*6236dae4SAndroid Build Coastguard Workercurl 97*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce 98*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt" 99*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/plain 100*6236dae4SAndroid Build Coastguard Worker 101*6236dae4SAndroid Build Coastguard Workerfoo- 102*6236dae4SAndroid Build Coastguard WorkerThis is a moo- 103*6236dae4SAndroid Build Coastguard Workerbar 104*6236dae4SAndroid Build Coastguard Worker 105*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce-- 106*6236dae4SAndroid Build Coastguard WorkerPOST http://remotehost:54321/we/want/%TESTNUMBER HTTP/1.1 107*6236dae4SAndroid Build Coastguard WorkerHost: remotehost:54321 108*6236dae4SAndroid Build Coastguard WorkerProxy-Authorization: Digest username="uuuser", realm="many secrets", nonce="911", uri="/we/want/%TESTNUMBER", response="b479994d13e60f3aa192a67c5892ddc5" 109*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION 110*6236dae4SAndroid Build Coastguard WorkerAccept: */* 111*6236dae4SAndroid Build Coastguard WorkerProxy-Connection: Keep-Alive 112*6236dae4SAndroid Build Coastguard WorkerExpect: 100-continue 113*6236dae4SAndroid Build Coastguard WorkerContent-Length: 433 114*6236dae4SAndroid Build Coastguard WorkerContent-Type: multipart/form-data; boundary=----------------------------7c633d5c27ce 115*6236dae4SAndroid Build Coastguard Worker 116*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce 117*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="name" 118*6236dae4SAndroid Build Coastguard Worker 119*6236dae4SAndroid Build Coastguard Workerdaniel 120*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce 121*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="tool" 122*6236dae4SAndroid Build Coastguard Worker 123*6236dae4SAndroid Build Coastguard Workercurl 124*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce 125*6236dae4SAndroid Build Coastguard WorkerContent-Disposition: form-data; name="file"; filename="test%TESTNUMBER.txt" 126*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/plain 127*6236dae4SAndroid Build Coastguard Worker 128*6236dae4SAndroid Build Coastguard Workerfoo- 129*6236dae4SAndroid Build Coastguard WorkerThis is a moo- 130*6236dae4SAndroid Build Coastguard Workerbar 131*6236dae4SAndroid Build Coastguard Worker 132*6236dae4SAndroid Build Coastguard Worker------------------------------7c633d5c27ce-- 133*6236dae4SAndroid Build Coastguard Worker</protocol> 134*6236dae4SAndroid Build Coastguard Worker</verify> 135*6236dae4SAndroid Build Coastguard Worker</testcase> 136