1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP GET 6HTTP Basic auth 7</keywords> 8</info> 9# Server-side 10<reply> 11 12<!-- First request has Basic auth, right password --> 13<data100> 14HTTP/1.1 200 Things are fine in server land 15Server: Microsoft-IIS/5.0 16Content-Type: text/html; charset=iso-8859-1 17Content-Length: 32 18 19Finally, this is the real page! 20</data100> 21 22<!-- Second request with Basic auth disabled --> 23<data200> 24HTTP/1.1 401 Sorry wrong password (2) 25Server: Microsoft-IIS/5.0 26Content-Type: text/html; charset=iso-8859-1 27Content-Length: 29 28WWW-Authenticate: Basic realm="testrealm" 29 30This is a bad password page! 31</data200> 32 33</reply> 34 35# Client-side 36<client> 37<server> 38http 39</server> 40<name> 41HTTP Basic authorization, then without authorization 42</name> 43<command option="no-output,no-include"> 44-u testuser:testpass http://%HOSTIP:%HTTPPORT/%TESTNUMBER0100 --next --no-basic http://%HOSTIP:%HTTPPORT/%TESTNUMBER0200 45</command> 46</client> 47 48# Verify data after the test has been "shot" 49<verify> 50<protocol> 51GET /%TESTNUMBER0100 HTTP/1.1 52Host: %HOSTIP:%HTTPPORT 53Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M= 54User-Agent: curl/%VERSION 55Accept: */* 56 57GET /%TESTNUMBER0200 HTTP/1.1 58Host: %HOSTIP:%HTTPPORT 59User-Agent: curl/%VERSION 60Accept: */* 61 62</protocol> 63<stdout> 64Finally, this is the real page! 65This is a bad password page! 66</stdout> 67</verify> 68</testcase> 69