1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP GET 6HTTP Basic auth 7--anyauth 8</keywords> 9</info> 10# Server-side 11<reply> 12<data> 13HTTP/1.1 401 Authorization Required swsbounce 14Server: Apache/1.3.27 (Darwin) PHP/4.1.2 15WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="fun fun fun" 16Content-Type: text/html; charset=iso-8859-1 17Content-Length: 26 18 19This is not the real page 20</data> 21 22# This is supposed to be returned when the server gets the second request 23<data1> 24HTTP/1.1 200 OK 25Server: Apache/1.3.27 (Darwin) PHP/4.1.2 26Content-Type: text/html; charset=iso-8859-1 27Content-Length: 23 28 29This IS the real page! 30</data1> 31 32<datacheck> 33HTTP/1.1 401 Authorization Required swsbounce 34Server: Apache/1.3.27 (Darwin) PHP/4.1.2 35WWW-Authenticate: X-MobileMe-AuthToken realm="Newcastle", Basic realm="fun fun fun" 36Content-Type: text/html; charset=iso-8859-1 37Content-Length: 26 38 39HTTP/1.1 200 OK 40Server: Apache/1.3.27 (Darwin) PHP/4.1.2 41Content-Type: text/html; charset=iso-8859-1 42Content-Length: 23 43 44This IS the real page! 45</datacheck> 46 47</reply> 48 49# Client-side 50<client> 51<server> 52http 53</server> 54 <name> 55HTTP with WWW-Authenticate and multiple auths in a single line 56 </name> 57 <command> 58http://%HOSTIP:%HTTPPORT/1204 -u testuser:testpass --anyauth 59</command> 60</client> 61 62# Verify data after the test has been "shot" 63<verify> 64<strip> 65^User-Agent:.* 66</strip> 67<protocol> 68GET /1204 HTTP/1.1 69Host: %HOSTIP:%HTTPPORT 70Accept: */* 71 72GET /1204 HTTP/1.1 73Host: %HOSTIP:%HTTPPORT 74Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M= 75Accept: */* 76 77</protocol> 78</verify> 79</testcase> 80