keywords added
[platform/upstream/curl.git] / tests / data / test65
1 <info>
2 <keywords>
3 HTTP
4 HTTP GET
5 HTTP Digest auth
6 </keywords>
7 </info>
8 # Server-side
9 <reply>
10 <data>
11 HTTP/1.1 401 Authorization Required\r
12 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
13 WWW-Authenticate: Digest realm="testrealm", nonce="2053604145"\r
14 Content-Type: text/html; charset=iso-8859-1\r
15 Content-Length: 26\r
16 \r
17 This is not the real page
18 </data>
19
20 # This is supposed to be returned when the server gets a
21 # Authorization: Digest line passed-in from the client
22 <data1000>
23 HTTP/1.1 401 Still a bad password you moron\r
24 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
25 Content-Type: text/html; charset=iso-8859-1\r
26 Content-Length: 34\r
27 \r
28 This is not the real page either\r
29 </data1000>
30
31 <datacheck>
32 HTTP/1.1 401 Authorization Required\r
33 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
34 WWW-Authenticate: Digest realm="testrealm", nonce="2053604145"\r
35 Content-Type: text/html; charset=iso-8859-1\r
36 Content-Length: 26\r
37 \r
38 HTTP/1.1 401 Still a bad password you moron\r
39 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
40 Content-Type: text/html; charset=iso-8859-1\r
41 Content-Length: 34\r
42 \r
43 This is not the real page either\r
44 </datacheck>
45
46 </reply>
47
48 # Client-side
49 <client>
50 <server>
51 http
52 </server>
53  <name>
54 HTTP with Digest authorization with bad password
55  </name>
56  <command>
57 http://%HOSTIP:%HTTPPORT/65 -u testuser:test2pass --digest
58 </command>
59 </client>
60
61 # Verify data after the test has been "shot"
62 <verify>
63 <strip>
64 ^User-Agent:.*
65 </strip>
66 <protocol>
67 GET /65 HTTP/1.1\r
68 Host: 127.0.0.1:%HTTPPORT\r
69 Pragma: no-cache\r
70 Accept: */*\r
71 \r
72 GET /65 HTTP/1.1\r
73 Authorization: Digest username="testuser", realm="testrealm", nonce="2053604145", uri="/65", response="66d68d3251f1839576ba7c766cf9205b"\r
74 User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
75 Host: 127.0.0.1:%HTTPPORT\r
76 Pragma: no-cache\r
77 Accept: */*\r
78 \r
79 </protocol>
80 </verify>