02aca818000260e21dd185cebdcb1b7c94fd52e2
[platform/upstream/curl.git] / tests / data / test2032
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP Basic auth
7 HTTP NTLM auth
8 </keywords>
9 </info>
10 # Server-side
11 <reply>
12
13 <!-- Basic auth -->
14 <data100>
15 HTTP/1.1 401 Need Basic or NTLM auth
16 Server: Microsoft-IIS/5.0
17 Content-Type: text/html; charset=iso-8859-1
18 Content-Length: 29
19 WWW-Authenticate: NTLM
20 WWW-Authenticate: Basic realm="testrealm"
21
22 This is a bad password page!
23 </data100>
24
25 <!-- NTML auth -->
26 <data200>
27 HTTP/1.1 401 Need Basic or NTLM auth (2)
28 Server: Microsoft-IIS/5.0
29 Content-Type: text/html; charset=iso-8859-1
30 Content-Length: 27
31 WWW-Authenticate: NTLM
32 WWW-Authenticate: Basic realm="testrealm"
33
34 This is not the real page!
35 </data200>
36
37 <data1201>
38 HTTP/1.1 401 NTLM intermediate (2)
39 Server: Microsoft-IIS/5.0
40 Content-Type: text/html; charset=iso-8859-1
41 Content-Length: 33
42 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
43
44 This is still not the real page!
45 </data1201>
46
47 <data1202>
48 HTTP/1.1 200 Things are fine in server land
49 Server: Microsoft-IIS/5.0
50 Content-Type: text/html; charset=iso-8859-1
51 Content-Length: 32
52
53 Finally, this is the real page!
54 </data1202>
55
56 <datacheck>
57 HTTP/1.1 401 Need Basic or NTLM auth
58 Server: Microsoft-IIS/5.0
59 Content-Type: text/html; charset=iso-8859-1
60 Content-Length: 29
61 WWW-Authenticate: NTLM
62 WWW-Authenticate: Basic realm="testrealm"
63
64 This is a bad password page!
65 HTTP/1.1 401 Need Basic or NTLM auth
66 Server: Microsoft-IIS/5.0
67 Content-Type: text/html; charset=iso-8859-1
68 Content-Length: 29
69 WWW-Authenticate: NTLM
70 WWW-Authenticate: Basic realm="testrealm"
71
72 This is a bad password page!
73 HTTP/1.1 401 NTLM intermediate (2)
74 Server: Microsoft-IIS/5.0
75 Content-Type: text/html; charset=iso-8859-1
76 Content-Length: 33
77 WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
78
79 HTTP/1.1 200 Things are fine in server land
80 Server: Microsoft-IIS/5.0
81 Content-Type: text/html; charset=iso-8859-1
82 Content-Length: 32
83
84 Finally, this is the real page!
85 </datacheck>
86
87 </reply>
88
89 # Client-side
90 <client>
91 <features>
92 NTLM
93 </features>
94 <server>
95 http
96 </server>
97 <tool>
98 libntlmconnect
99 </tool>
100
101  <name>
102 NTLM connection mapping
103  </name>
104  <setenv>
105 # we force our own host name, in order to make the test machine independent
106 CURL_GETHOSTNAME=curlhost
107 # we try to use the LD_PRELOAD hack, if not a debug build
108 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
109  </setenv>
110  <command>
111 http://%HOSTIP:%HTTPPORT/2032
112 </command>
113 <precheck>
114 chkhostname curlhost
115 </precheck>
116 </client>
117
118 # Verify data after the test has been "shot"
119 <verify>
120 <strip>
121 ^User-Agent:.*
122 </strip>
123 <protocol>
124 GET /20320100 HTTP/1.1\r
125 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
126 Host: 127.0.0.1:8990\r
127 Accept: */*\r
128 \r
129 GET /20320100 HTTP/1.1\r
130 Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=\r
131 Host: 127.0.0.1:8990\r
132 Accept: */*\r
133 \r
134 GET /20320200 HTTP/1.1\r
135 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
136 Host: 127.0.0.1:8990\r
137 Accept: */*\r
138 \r
139 GET /20320200 HTTP/1.1\r
140 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=\r
141 Host: 127.0.0.1:8990\r
142 Accept: */*\r
143 \r
144 </protocol>
145 </verify>
146 </testcase>