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