test1418 (2422B)
1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 HTTP NTLM auth 7 connection reuse 8 </keywords> 9 </info> 10 # Server-side 11 <reply> 12 <servercmd> 13 connection-monitor 14 </servercmd> 15 16 <data> 17 HTTP/1.1 401 Authentication please! 18 Content-Length: 20 19 WWW-Authenticate: Digest realm="loonie", nonce="314156592" 20 WWW-Authenticate: Basic 21 22 Please auth with me 23 </data> 24 25 <data3> 26 HTTP/1.1 401 Authentication please! 27 Content-Length: 20 28 WWW-Authenticate: Digest realm="loonie", nonce="314156592" 29 WWW-Authenticate: Basic 30 31 Please auth with me 32 </data3> 33 34 # This is supposed to be returned when the server gets the second 35 # Authorization: NTLM line passed-in from the client 36 <data1000> 37 HTTP/1.1 200 Things are fine in server land 38 Server: Microsoft-IIS/5.0 39 Content-Length: 4 40 41 moo 42 </data1000> 43 44 <data1003> 45 HTTP/1.1 200 OK 46 Server: Another one/1.0 47 Content-Length: 4 48 49 boo 50 </data1003> 51 52 # This is the first reply after the redirection 53 <data1011> 54 HTTP/1.1 200 OK 55 Server: Microsoft-IIS/5.0 56 Content-Type: text/html; charset=iso-8859-1 57 Content-Length: 34 58 59 This is not the real page either! 60 </data1011> 61 62 <datacheck> 63 HTTP/1.1 401 Authentication please! 64 Content-Length: 20 65 WWW-Authenticate: Digest realm="loonie", nonce="314156592" 66 WWW-Authenticate: Basic 67 68 HTTP/1.1 200 Things are fine in server land 69 Server: Microsoft-IIS/5.0 70 Content-Length: 4 71 72 moo 73 </datacheck> 74 75 </reply> 76 77 # Client-side 78 <client> 79 <server> 80 http 81 </server> 82 <features> 83 !SSPI 84 crypto 85 digest 86 </features> 87 <name> 88 HTTP with --anyauth and connection reuse 89 </name> 90 <command> 91 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/%TESTNUMBER0003 92 </command> 93 </client> 94 95 # Verify data after the test has been "shot" 96 <verify> 97 <protocol> 98 GET /%TESTNUMBER HTTP/1.1 99 Host: %HOSTIP:%HTTPPORT 100 User-Agent: curl/%VERSION 101 Accept: */* 102 103 GET /%TESTNUMBER HTTP/1.1 104 Host: %HOSTIP:%HTTPPORT 105 Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/%TESTNUMBER", response="986238b7e0077754944c966f56d9bc77" 106 User-Agent: curl/%VERSION 107 Accept: */* 108 109 GET /%TESTNUMBER0003 HTTP/1.1 110 Host: %HOSTIP:%HTTPPORT 111 User-Agent: curl/%VERSION 112 Accept: */* 113 114 GET /%TESTNUMBER0003 HTTP/1.1 115 Host: %HOSTIP:%HTTPPORT 116 Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/%TESTNUMBER0003", response="1c6390a67bac3283a9b023402f3b3540" 117 User-Agent: curl/%VERSION 118 Accept: */* 119 120 [DISCONNECT] 121 </protocol> 122 </verify> 123 </testcase>