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