1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP PUT 6HTTP Digest auth 7</keywords> 8</info> 9 10# Server-side 11<reply> 12<data> 13HTTP/1.1 401 authentication please swsbounce 14Server: Microsoft-IIS/6.0 15WWW-Authenticate: Digest realm="testrealm", nonce="1053604144" 16Content-Type: text/html; charset=iso-8859-1 17Content-Length: 0 18 19</data> 20<data1000> 21HTTP/1.1 200 A OK 22Server: Microsoft-IIS/6.0 23Content-Type: text/html; charset=iso-8859-1 24Content-Length: 3 25 26ok 27</data1000> 28 29<datacheck> 30HTTP/1.1 401 authentication please swsbounce 31Server: Microsoft-IIS/6.0 32WWW-Authenticate: Digest realm="testrealm", nonce="1053604144" 33Content-Type: text/html; charset=iso-8859-1 34Content-Length: 0 35 36HTTP/1.1 200 A OK 37Server: Microsoft-IIS/6.0 38Content-Type: text/html; charset=iso-8859-1 39Content-Length: 3 40 41ok 42</datacheck> 43 44</reply> 45 46# Client-side 47<client> 48# 49<server> 50http 51</server> 52<features> 53!SSPI 54crypto 55</features> 56<name> 57HTTP PUT --digest with user-specified Content-Length header 58</name> 59# This test is to ensure 'Content-Length: 0' is sent while negotiating auth 60# even when there is a user-specified Content-Length header. 61# https://github.com/curl/curl/pull/1242 62<command> 63-H "Content-Length: 85" -u auser:apasswd --digest -T %LOGDIR/put%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER 64</command> 65<file name="%LOGDIR/put%TESTNUMBER"> 66This is data we upload with PUT 67a second line 68line three 69four is the number of lines 70</file> 71</client> 72 73# Verify data after the test has been "shot" 74<verify> 75<protocol> 76PUT /%TESTNUMBER HTTP/1.1 77Host: %HOSTIP:%HTTPPORT 78User-Agent: curl/%VERSION 79Accept: */* 80Content-Length: 0 81 82PUT /%TESTNUMBER HTTP/1.1 83Host: %HOSTIP:%HTTPPORT 84Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="dc185587d5e8391b347eef194c2a3cd6" 85User-Agent: curl/%VERSION 86Accept: */* 87Content-Length: 85 88 89This is data we upload with PUT 90a second line 91line three 92four is the number of lines 93</protocol> 94</verify> 95</testcase> 96