1*6236dae4SAndroid Build Coastguard Worker<testcase> 2*6236dae4SAndroid Build Coastguard Worker# Redirection is used to force curl to realize that the server is 3*6236dae4SAndroid Build Coastguard Worker# speaking HTTP 1.0. The request is impossible to satisfy with HTTP 1.0 4*6236dae4SAndroid Build Coastguard Worker# because chunked encoding is unavailable, so the request must fail. 5*6236dae4SAndroid Build Coastguard Worker<info> 6*6236dae4SAndroid Build Coastguard Worker<keywords> 7*6236dae4SAndroid Build Coastguard WorkerHTTP 8*6236dae4SAndroid Build Coastguard WorkerHTTP PUT 9*6236dae4SAndroid Build Coastguard WorkerHTTP/1.0 10*6236dae4SAndroid Build Coastguard Workerfollowlocation 11*6236dae4SAndroid Build Coastguard Workerchunked Transfer-Encoding 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.0 301 Redirect swsclose 19*6236dae4SAndroid Build Coastguard WorkerServer: testcurl 20*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/plain 21*6236dae4SAndroid Build Coastguard WorkerLocation: /newlocation/%TESTNUMBER0002 22*6236dae4SAndroid Build Coastguard WorkerContent-Length: 0 23*6236dae4SAndroid Build Coastguard WorkerConnection: close 24*6236dae4SAndroid Build Coastguard Worker 25*6236dae4SAndroid Build Coastguard Worker</data> 26*6236dae4SAndroid Build Coastguard Worker</reply> 27*6236dae4SAndroid Build Coastguard Worker 28*6236dae4SAndroid Build Coastguard Worker# Client-side 29*6236dae4SAndroid Build Coastguard Worker<client> 30*6236dae4SAndroid Build Coastguard Worker<server> 31*6236dae4SAndroid Build Coastguard Workerhttp 32*6236dae4SAndroid Build Coastguard Worker</server> 33*6236dae4SAndroid Build Coastguard Worker<name> 34*6236dae4SAndroid Build Coastguard WorkerHTTP chunked PUT to HTTP 1.0 server with redirect 35*6236dae4SAndroid Build Coastguard Worker</name> 36*6236dae4SAndroid Build Coastguard Worker<command> 37*6236dae4SAndroid Build Coastguard Workerhttp://%HOSTIP:%HTTPPORT/%TESTNUMBER -T - -L 38*6236dae4SAndroid Build Coastguard Worker</command> 39*6236dae4SAndroid Build Coastguard Worker<stdin> 40*6236dae4SAndroid Build Coastguard WorkerThis is data we upload with PUT 41*6236dae4SAndroid Build Coastguard Workerit comes from stdin so MUST be sent 42*6236dae4SAndroid Build Coastguard Workerwith chunked encoding 43*6236dae4SAndroid Build Coastguard Workerwhich is impossible in HTTP/1.0 44*6236dae4SAndroid Build Coastguard Worker</stdin> 45*6236dae4SAndroid Build Coastguard Worker</client> 46*6236dae4SAndroid Build Coastguard Worker 47*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot" 48*6236dae4SAndroid Build Coastguard Worker<verify> 49*6236dae4SAndroid Build Coastguard Worker<errorcode> 50*6236dae4SAndroid Build Coastguard Worker25 51*6236dae4SAndroid Build Coastguard Worker</errorcode> 52*6236dae4SAndroid Build Coastguard Worker<protocol> 53*6236dae4SAndroid Build Coastguard WorkerPUT /%TESTNUMBER HTTP/1.1 54*6236dae4SAndroid Build Coastguard WorkerHost: %HOSTIP:%HTTPPORT 55*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION 56*6236dae4SAndroid Build Coastguard WorkerAccept: */* 57*6236dae4SAndroid Build Coastguard WorkerTransfer-Encoding: chunked 58*6236dae4SAndroid Build Coastguard WorkerExpect: 100-continue 59*6236dae4SAndroid Build Coastguard Worker 60*6236dae4SAndroid Build Coastguard Worker%if hyper 61*6236dae4SAndroid Build Coastguard Worker7A 62*6236dae4SAndroid Build Coastguard Worker%else 63*6236dae4SAndroid Build Coastguard Worker7a 64*6236dae4SAndroid Build Coastguard Worker%endif 65*6236dae4SAndroid Build Coastguard WorkerThis is data we upload with PUT 66*6236dae4SAndroid Build Coastguard Workerit comes from stdin so MUST be sent 67*6236dae4SAndroid Build Coastguard Workerwith chunked encoding 68*6236dae4SAndroid Build Coastguard Workerwhich is impossible in HTTP/1.0 69*6236dae4SAndroid Build Coastguard Worker 70*6236dae4SAndroid Build Coastguard Worker0 71*6236dae4SAndroid Build Coastguard Worker 72*6236dae4SAndroid Build Coastguard Worker</protocol> 73*6236dae4SAndroid Build Coastguard Worker</verify> 74*6236dae4SAndroid Build Coastguard Worker</testcase> 75