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