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 PUT 6*6236dae4SAndroid Build Coastguard WorkerHTTP Basic auth 7*6236dae4SAndroid Build Coastguard Worker--anyauth 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# The test server provides no way to respond differently to a subsequent 14*6236dae4SAndroid Build Coastguard Worker# Basic authenticated request (we really want to respond with 200 for 15*6236dae4SAndroid Build Coastguard Worker# the second), so just respond with 401 for both and let curl deal with it. 16*6236dae4SAndroid Build Coastguard Worker<data> 17*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 401 Authorization Required 18*6236dae4SAndroid Build Coastguard WorkerServer: testcurl 19*6236dae4SAndroid Build Coastguard WorkerWWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" 20*6236dae4SAndroid Build Coastguard WorkerWWW-Authenticate: Basic realm="gimme all yer s3cr3ts" 21*6236dae4SAndroid Build Coastguard WorkerWWW-Authenticate: X-bogus-auth realm="gimme all yer s3cr3ts" 22*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/plain 23*6236dae4SAndroid Build Coastguard WorkerContent-Length: 0 24*6236dae4SAndroid Build Coastguard Worker 25*6236dae4SAndroid Build Coastguard Worker</data> 26*6236dae4SAndroid Build Coastguard Worker<datacheck> 27*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 401 Authorization Required 28*6236dae4SAndroid Build Coastguard WorkerServer: testcurl 29*6236dae4SAndroid Build Coastguard WorkerWWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" 30*6236dae4SAndroid Build Coastguard WorkerWWW-Authenticate: Basic realm="gimme all yer s3cr3ts" 31*6236dae4SAndroid Build Coastguard WorkerWWW-Authenticate: X-bogus-auth realm="gimme all yer s3cr3ts" 32*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/plain 33*6236dae4SAndroid Build Coastguard WorkerContent-Length: 0 34*6236dae4SAndroid Build Coastguard Worker 35*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 401 Authorization Required 36*6236dae4SAndroid Build Coastguard WorkerServer: testcurl 37*6236dae4SAndroid Build Coastguard WorkerWWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" 38*6236dae4SAndroid Build Coastguard WorkerWWW-Authenticate: Basic realm="gimme all yer s3cr3ts" 39*6236dae4SAndroid Build Coastguard WorkerWWW-Authenticate: X-bogus-auth realm="gimme all yer s3cr3ts" 40*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/plain 41*6236dae4SAndroid Build Coastguard WorkerContent-Length: 0 42*6236dae4SAndroid Build Coastguard Worker 43*6236dae4SAndroid Build Coastguard Worker</datacheck> 44*6236dae4SAndroid Build Coastguard Worker</reply> 45*6236dae4SAndroid Build Coastguard Worker 46*6236dae4SAndroid Build Coastguard Worker# Client-side 47*6236dae4SAndroid Build Coastguard Worker<client> 48*6236dae4SAndroid Build Coastguard Worker<server> 49*6236dae4SAndroid Build Coastguard Workerhttp 50*6236dae4SAndroid Build Coastguard Worker</server> 51*6236dae4SAndroid Build Coastguard Worker<name> 52*6236dae4SAndroid Build Coastguard WorkerHTTP PUT with --anyauth authorization (picking Basic) 53*6236dae4SAndroid Build Coastguard Worker</name> 54*6236dae4SAndroid Build Coastguard Worker<command> 55*6236dae4SAndroid Build Coastguard Workerhttp://%HOSTIP:%HTTPPORT/%TESTNUMBER -T %LOGDIR/put%TESTNUMBER -u testuser:testpass --anyauth 56*6236dae4SAndroid Build Coastguard Worker</command> 57*6236dae4SAndroid Build Coastguard Worker<file name="%LOGDIR/put%TESTNUMBER"> 58*6236dae4SAndroid Build Coastguard WorkerThis is data we upload with PUT 59*6236dae4SAndroid Build Coastguard Workera second line 60*6236dae4SAndroid Build Coastguard Workerline three 61*6236dae4SAndroid Build Coastguard Workerfour is the number of lines 62*6236dae4SAndroid Build Coastguard Worker</file> 63*6236dae4SAndroid Build Coastguard Worker</client> 64*6236dae4SAndroid Build Coastguard Worker 65*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot" 66*6236dae4SAndroid Build Coastguard Worker<verify> 67*6236dae4SAndroid Build Coastguard Worker<protocol> 68*6236dae4SAndroid Build Coastguard WorkerPUT /%TESTNUMBER HTTP/1.1 69*6236dae4SAndroid Build Coastguard WorkerHost: %HOSTIP:%HTTPPORT 70*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION 71*6236dae4SAndroid Build Coastguard WorkerAccept: */* 72*6236dae4SAndroid Build Coastguard WorkerContent-Length: 85 73*6236dae4SAndroid Build Coastguard Worker 74*6236dae4SAndroid Build Coastguard WorkerThis is data we upload with PUT 75*6236dae4SAndroid Build Coastguard Workera second line 76*6236dae4SAndroid Build Coastguard Workerline three 77*6236dae4SAndroid Build Coastguard Workerfour is the number of lines 78*6236dae4SAndroid Build Coastguard WorkerPUT /%TESTNUMBER HTTP/1.1 79*6236dae4SAndroid Build Coastguard WorkerHost: %HOSTIP:%HTTPPORT 80*6236dae4SAndroid Build Coastguard WorkerAuthorization: Basic dGVzdHVzZXI6dGVzdHBhc3M= 81*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION 82*6236dae4SAndroid Build Coastguard WorkerAccept: */* 83*6236dae4SAndroid Build Coastguard WorkerContent-Length: 85 84*6236dae4SAndroid Build Coastguard Worker 85*6236dae4SAndroid Build Coastguard WorkerThis is data we upload with PUT 86*6236dae4SAndroid Build Coastguard Workera second line 87*6236dae4SAndroid Build Coastguard Workerline three 88*6236dae4SAndroid Build Coastguard Workerfour is the number of lines 89*6236dae4SAndroid Build Coastguard Worker</protocol> 90*6236dae4SAndroid Build Coastguard Worker</verify> 91*6236dae4SAndroid Build Coastguard Worker</testcase> 92