1 <testcase> 2 <info> 3 <keywords> 4 HTTP 5 HTTP GET 6 HTTP NTLM auth 7 </keywords> 8 </info> 9 # Server-side 10 <reply> 11 12 <!-- First request has NTLM auth, wrong password --> 13 <data100> 14 HTTP/1.1 401 Need NTLM auth 15 Server: Microsoft-IIS/5.0 16 Content-Type: text/html; charset=iso-8859-1 17 Content-Length: 27 18 WWW-Authenticate: NTLM 19 20 This is not the real page! 21 </data100> 22 23 <data1101> 24 HTTP/1.1 401 NTLM intermediate 25 Server: Microsoft-IIS/5.0 26 Content-Type: text/html; charset=iso-8859-1 27 Content-Length: 33 28 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg= 29 30 This is still not the real page! 31 </data1101> 32 33 <data1102> 34 HTTP/1.1 401 Sorry wrong password 35 Server: Microsoft-IIS/5.0 36 Content-Type: text/html; charset=iso-8859-1 37 Content-Length: 29 38 WWW-Authenticate: NTLM 39 40 This is a bad password page! 41 </data1102> 42 43 <!-- Second request has NTML auth, right password --> 44 <data200> 45 HTTP/1.1 401 Need NTLM auth (2) 46 Server: Microsoft-IIS/5.0 47 Content-Type: text/html; charset=iso-8859-1 48 Content-Length: 27 49 WWW-Authenticate: NTLM 50 51 This is not the real page! 52 </data200> 53 54 <data1201> 55 HTTP/1.1 401 NTLM intermediate (2) 56 Server: Microsoft-IIS/5.0 57 Content-Type: text/html; charset=iso-8859-1 58 Content-Length: 33 59 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg= 60 61 This is still not the real page! 62 </data1201> 63 64 <data1202> 65 HTTP/1.1 200 Things are fine in server land 66 Server: Microsoft-IIS/5.0 67 Content-Type: text/html; charset=iso-8859-1 68 Content-Length: 32 69 70 Finally, this is the real page! 71 </data1202> 72 73 <!-- Third request has NTLM auth, wrong password --> 74 <data300> 75 HTTP/1.1 401 Need NTLM auth (3) 76 Server: Microsoft-IIS/5.0 77 Content-Type: text/html; charset=iso-8859-1 78 Content-Length: 27 79 WWW-Authenticate: NTLM 80 81 This is not the real page! 82 </data300> 83 84 <data1301> 85 HTTP/1.1 401 NTLM intermediate (3) 86 Server: Microsoft-IIS/5.0 87 Content-Type: text/html; charset=iso-8859-1 88 Content-Length: 33 89 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg= 90 91 This is still not the real page! 92 </data1301> 93 94 <data1302> 95 HTTP/1.1 401 Sorry wrong password (2) 96 Server: Microsoft-IIS/5.0 97 Content-Type: text/html; charset=iso-8859-1 98 Content-Length: 29 99 WWW-Authenticate: NTLM 100 101 This is a bad password page! 102 </data1302> 103 104 <!-- Fourth request has NTLM auth, wrong password --> 105 <data400> 106 HTTP/1.1 401 Need NTLM auth (4) 107 Server: Microsoft-IIS/5.0 108 Content-Type: text/html; charset=iso-8859-1 109 Content-Length: 27 110 WWW-Authenticate: NTLM 111 112 This is not the real page! 113 </data400> 114 115 <data1401> 116 HTTP/1.1 401 NTLM intermediate (4) 117 Server: Microsoft-IIS/5.0 118 Content-Type: text/html; charset=iso-8859-1 119 Content-Length: 33 120 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg= 121 122 This is still not the real page! 123 </data1401> 124 125 <data1402> 126 HTTP/1.1 401 Sorry wrong password (3) 127 Server: Microsoft-IIS/5.0 128 Content-Type: text/html; charset=iso-8859-1 129 Content-Length: 29 130 WWW-Authenticate: NTLM 131 132 This is a bad password page! 133 </data1402> 134 135 <!-- Fifth request has NTLM auth, right password --> 136 <data500> 137 HTTP/1.1 401 Need NTLM auth (5) 138 Server: Microsoft-IIS/5.0 139 Content-Type: text/html; charset=iso-8859-1 140 Content-Length: 27 141 WWW-Authenticate: NTLM 142 143 This is not the real page! 144 </data500> 145 146 <data1501> 147 HTTP/1.1 401 NTLM intermediate (5) 148 Server: Microsoft-IIS/5.0 149 Content-Type: text/html; charset=iso-8859-1 150 Content-Length: 33 151 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg= 152 153 This is still not the real page! 154 </data1501> 155 156 <data1502> 157 HTTP/1.1 200 Things are fine in server land (2) 158 Server: Microsoft-IIS/5.0 159 Content-Type: text/html; charset=iso-8859-1 160 Content-Length: 32 161 162 Finally, this is the real page! 163 </data1502> 164 165 <datacheck> 166 HTTP/1.1 401 NTLM intermediate 167 Server: Microsoft-IIS/5.0 168 Content-Type: text/html; charset=iso-8859-1 169 Content-Length: 33 170 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg= 171 172 HTTP/1.1 401 Sorry wrong password 173 Server: Microsoft-IIS/5.0 174 Content-Type: text/html; charset=iso-8859-1 175 Content-Length: 29 176 WWW-Authenticate: NTLM 177 178 This is a bad password page! 179 HTTP/1.1 401 NTLM intermediate (2) 180 Server: Microsoft-IIS/5.0 181 Content-Type: text/html; charset=iso-8859-1 182 Content-Length: 33 183 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg= 184 185 HTTP/1.1 200 Things are fine in server land 186 Server: Microsoft-IIS/5.0 187 Content-Type: text/html; charset=iso-8859-1 188 Content-Length: 32 189 190 Finally, this is the real page! 191 HTTP/1.1 401 NTLM intermediate (3) 192 Server: Microsoft-IIS/5.0 193 Content-Type: text/html; charset=iso-8859-1 194 Content-Length: 33 195 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg= 196 197 HTTP/1.1 401 Sorry wrong password (2) 198 Server: Microsoft-IIS/5.0 199 Content-Type: text/html; charset=iso-8859-1 200 Content-Length: 29 201 WWW-Authenticate: NTLM 202 203 This is a bad password page! 204 HTTP/1.1 401 NTLM intermediate (4) 205 Server: Microsoft-IIS/5.0 206 Content-Type: text/html; charset=iso-8859-1 207 Content-Length: 33 208 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg= 209 210 HTTP/1.1 401 Sorry wrong password (3) 211 Server: Microsoft-IIS/5.0 212 Content-Type: text/html; charset=iso-8859-1 213 Content-Length: 29 214 WWW-Authenticate: NTLM 215 216 This is a bad password page! 217 HTTP/1.1 401 NTLM intermediate (5) 218 Server: Microsoft-IIS/5.0 219 Content-Type: text/html; charset=iso-8859-1 220 Content-Length: 33 221 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg= 222 223 HTTP/1.1 200 Things are fine in server land (2) 224 Server: Microsoft-IIS/5.0 225 Content-Type: text/html; charset=iso-8859-1 226 Content-Length: 32 227 228 Finally, this is the real page! 229 </datacheck> 230 231 </reply> 232 233 # Client-side 234 <client> 235 <features> 236 NTLM 237 !SSPI 238 </features> 239 <server> 240 http 241 </server> 242 <tool> 243 libauthretry 244 </tool> 245 246 <name> 247 HTTP authorization retry (NTLM) 248 </name> 249 <setenv> 250 # we force our own host name, in order to make the test machine independent 251 CURL_GETHOSTNAME=curlhost 252 # we try to use the LD_PRELOAD hack, if not a debug build 253 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so 254 </setenv> 255 <command> 256 http://%HOSTIP:%HTTPPORT/2031 ntlm ntlm 257 </command> 258 <precheck> 259 chkhostname curlhost 260 </precheck> 261 </client> 262 263 # Verify data after the test has been "shot" 264 <verify> 265 <strip> 266 ^User-Agent:.* 267 </strip> 268 <protocol> 269 GET /20310100 HTTP/1.1 270 Host: %HOSTIP:%HTTPPORT 271 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 272 Accept: */* 273 274 GET /20310100 HTTP/1.1 275 Host: %HOSTIP:%HTTPPORT 276 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q= 277 Accept: */* 278 279 GET /20310200 HTTP/1.1 280 Host: %HOSTIP:%HTTPPORT 281 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 282 Accept: */* 283 284 GET /20310200 HTTP/1.1 285 Host: %HOSTIP:%HTTPPORT 286 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q= 287 Accept: */* 288 289 GET /20310300 HTTP/1.1 290 Host: %HOSTIP:%HTTPPORT 291 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 292 Accept: */* 293 294 GET /20310300 HTTP/1.1 295 Host: %HOSTIP:%HTTPPORT 296 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q= 297 Accept: */* 298 299 GET /20310400 HTTP/1.1 300 Host: %HOSTIP:%HTTPPORT 301 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 302 Accept: */* 303 304 GET /20310400 HTTP/1.1 305 Host: %HOSTIP:%HTTPPORT 306 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q= 307 Accept: */* 308 309 GET /20310500 HTTP/1.1 310 Host: %HOSTIP:%HTTPPORT 311 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= 312 Accept: */* 313 314 GET /20310500 HTTP/1.1 315 Host: %HOSTIP:%HTTPPORT 316 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q= 317 Accept: */* 318 319 </protocol> 320 </verify> 321 </testcase> 322