1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP Digest auth
7--anyauth
8</keywords>
9</info>
10
11# Server-side
12<reply>
13<servercmd>
14auth_required
15</servercmd>
16<data>
17HTTP/1.1 401 Authorization Required swsclose
18Server: Apache/1.3.27 (Darwin) PHP/4.1.2
19WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
20WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
21WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
22Content-Type: text/html; charset=iso-8859-1
23Connection: close
24
25This is not the real page
26</data>
27
28# This is supposed to be returned when the server gets a
29# Authorization: Digest line passed-in from the client
30<data1000>
31HTTP/1.1 200 OK swsclose
32Server: Apache/1.3.27 (Darwin) PHP/4.1.2
33Content-Type: text/html; charset=iso-8859-1
34Content-Length: 23
35Connection: close
36
37This IS the real page!
38</data1000>
39
40# This is the second request
41<data1001>
42HTTP/1.1 200 OK swsclose
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 second real page!
49</data1001>
50
51<datacheck>
52HTTP/1.1 401 Authorization Required swsclose
53Server: Apache/1.3.27 (Darwin) PHP/4.1.2
54WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
55WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
56WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
57Content-Type: text/html; charset=iso-8859-1
58Connection: close
59
60HTTP/1.1 200 OK swsclose
61Server: Apache/1.3.27 (Darwin) PHP/4.1.2
62Content-Type: text/html; charset=iso-8859-1
63Content-Length: 23
64Connection: close
65
66This IS the real page!
67</datacheck>
68
69</reply>
70
71# Client-side
72<client>
73<server>
74http
75</server>
76<features>
77crypto
78</features>
79 <name>
80HTTP GET with --anyauth with two URLs (picking Digest) 
81 </name>
82 <command>
83http://%HOSTIP:%HTTPPORT/1412 -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/14120001
84</command>
85<file name="log/put1412">
86This is data we upload with PUT
87a second line
88line three
89four is the number of lines
90</file>
91</client>
92
93# Verify data after the test has been "shot"
94<verify>
95<strip>
96^User-Agent:.*
97</strip>
98<protocol>
99GET /1412 HTTP/1.1
100Host: %HOSTIP:%HTTPPORT
101Accept: */*
102
103GET /1412 HTTP/1.1
104Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1412", response="0390dbe89e31adca0413d11f91f30e7f"
105User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
106Host: %HOSTIP:%HTTPPORT
107Accept: */*
108
109GET /14120001 HTTP/1.1
110Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/14120001", response="0085df91870374c8bf4e94415e7fbf8e"
111User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
112Host: %HOSTIP:%HTTPPORT
113Accept: */*
114
115</protocol>
116</verify>
117</testcase>
118