1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP PUT 6HTTP Digest auth 7--anyauth 8</keywords> 9</info> 10 11# Server-side 12<reply> 13<servercmd> 14auth_required 15</servercmd> 16<data> 17HTTP/1.1 401 Authorization Required swsclose 18Server: Apache/1.3.27 (Darwin) PHP/4.1.2 19WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" 20WWW-Authenticate: Basic realm="gimme all yer s3cr3ts" 21WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344" 22Content-Type: text/html; charset=iso-8859-1 23Connection: close 24 25This is not the real page 26</data> 27 28# This is supposed to be returned when the server gets a 29# Authorization: Digest line passed-in from the client 30<data1000> 31HTTP/1.1 200 OK swsclose 32Server: Apache/1.3.27 (Darwin) PHP/4.1.2 33Content-Type: text/html; charset=iso-8859-1 34Content-Length: 23 35Connection: close 36 37This IS the real page! 38</data1000> 39 40<datacheck> 41HTTP/1.1 401 Authorization Required swsclose 42Server: Apache/1.3.27 (Darwin) PHP/4.1.2 43WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" 44WWW-Authenticate: Basic realm="gimme all yer s3cr3ts" 45WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344" 46Content-Type: text/html; charset=iso-8859-1 47Connection: close 48 49HTTP/1.1 200 OK swsclose 50Server: Apache/1.3.27 (Darwin) PHP/4.1.2 51Content-Type: text/html; charset=iso-8859-1 52Content-Length: 23 53Connection: close 54 55This IS the real page! 56</datacheck> 57 58</reply> 59 60# Client-side 61<client> 62<server> 63http 64</server> 65<features> 66crypto 67</features> 68 <name> 69HTTP PUT with --anyauth authorization (picking Digest) 70 </name> 71 <command> 72http://%HOSTIP:%HTTPPORT/154 -T log/put154 -u testuser:testpass --anyauth 73</command> 74<file name="log/put154"> 75This is data we upload with PUT 76a second line 77line three 78four is the number of lines 79</file> 80</client> 81 82# Verify data after the test has been "shot" 83<verify> 84<strip> 85^User-Agent:.* 86</strip> 87<protocol> 88PUT /154 HTTP/1.1 89Host: %HOSTIP:%HTTPPORT 90Accept: */* 91Content-Length: 85 92Expect: 100-continue 93 94PUT /154 HTTP/1.1 95Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/154", response="b71551e12d1c456e47d8388ecb2edeca" 96User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3 97Host: %HOSTIP:%HTTPPORT 98Accept: */* 99Content-Length: 85 100Expect: 100-continue 101 102This is data we upload with PUT 103a second line 104line three 105four is the number of lines 106</protocol> 107</verify> 108</testcase> 109