1<testcase> 2# Authorization is used to force curl to realize that the server is 3# speaking HTTP 1.0. The request is impossible to satisfy with HTTP 1.0 4# because chunked encoding is unavailable, so the request must fail. 5<info> 6<keywords> 7HTTP 8HTTP PUT 9HTTP Digest auth 10--anyauth 11HTTP/1.0 12chunked Transfer-Encoding 13</keywords> 14</info> 15 16# Server-side 17<reply> 18<data> 19HTTP/1.0 401 Authorization Required swsclose 20Server: testcurl 21WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" 22WWW-Authenticate: Basic realm="gimme all yer s3cr3ts" 23WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344" 24Content-Type: text/plain 25Content-Length: 0 26Connection: close 27 28</data> 29</reply> 30 31# Client-side 32<client> 33<server> 34http 35</server> 36<features> 37crypto 38</features> 39 <name> 40HTTP chunked PUT to HTTP 1.0 server with authorization 41 </name> 42 <command> 43http://%HOSTIP:%HTTPPORT/1072 -T - -u testuser:testpass --anyauth 44</command> 45<stdin> 46This is data we upload with PUT 47it comes from stdin so MUST be sent 48with chunked encoding 49which is impossible in HTTP/1.0 50</stdin> 51</client> 52 53# Verify data after the test has been "shot" 54<verify> 55<errorcode> 5625 57</errorcode> 58<strip> 59^User-Agent:.* 60</strip> 61<protocol> 62PUT /1072 HTTP/1.1 63Host: %HOSTIP:%HTTPPORT 64Accept: */* 65Transfer-Encoding: chunked 66Expect: 100-continue 67 687a 69This is data we upload with PUT 70it comes from stdin so MUST be sent 71with chunked encoding 72which is impossible in HTTP/1.0 73 740 75 76</protocol> 77</verify> 78</testcase> 79