1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP Basic auth 6</keywords> 7</info> 8 9# Server-side 10<reply> 11<data> 12HTTP/1.1 401 Authorization Required swsbounce 13Server: Apache/1.3.27 (Darwin) PHP/4.1.2 14WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" 15WWW-Authenticate: Basic realm="gimme all yer s3cr3ts" 16Content-Length: 26 17Content-Type: text/html; charset=iso-8859-1 18 19This is not the real page 20</data> 21 22# This is supposed to be returned when the server gets a 23# Authorization: Digest line passed-in from the client 24<data1> 25HTTP/1.1 200 OK 26Server: Apache/1.3.27 (Darwin) PHP/4.1.2 27Content-Type: text/html; charset=iso-8859-1 28Content-Length: 23 29Connection: close 30 31This IS the real page! 32</data1> 33 34<datacheck> 35HTTP/1.1 401 Authorization Required swsbounce 36Server: Apache/1.3.27 (Darwin) PHP/4.1.2 37WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" 38WWW-Authenticate: Basic realm="gimme all yer s3cr3ts" 39Content-Length: 26 40Content-Type: text/html; charset=iso-8859-1 41 42HTTP/1.1 200 OK 43Server: Apache/1.3.27 (Darwin) PHP/4.1.2 44Content-Type: text/html; charset=iso-8859-1 45Content-Length: 23 46Connection: close 47 48This IS the real page! 49</datacheck> 50</reply> 51 52# Client-Side 53<client> 54# require https because the code sets that as an acceptable redirect proto 55<features> 56https 57</features> 58<server> 59http 60</server> 61<tool> 62lib%TESTNUMBER 63</tool> 64 65<name> 66HTTP auth without redirection protocols 67</name> 68<command> 69http://%HOSTIP:%HTTPPORT/%TESTNUMBER 70</command> 71</client> 72 73# Verify data after the test has been "shot" 74<verify> 75<protocol> 76GET /%TESTNUMBER HTTP/1.1 77Host: %HOSTIP:%HTTPPORT 78Accept: */* 79 80GET /%TESTNUMBER HTTP/1.1 81Host: %HOSTIP:%HTTPPORT 82Authorization: Basic dXNlcjpwYXNzd29yZA== 83Accept: */* 84 85</protocol> 86</verify> 87 88</testcase> 89